(132.5ms) DROP DATABASE IF EXISTS "disco_app_test"  (311.2ms) CREATE DATABASE "disco_app_test" ENCODING = 'unicode' SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (0.2ms) DROP TABLE IF EXISTS "carts" CASCADE  (4.5ms) CREATE TABLE "carts" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "token" character varying, "data" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE UNIQUE INDEX "index_carts_on_token" ON "carts" ("token")  (0.2ms) DROP TABLE IF EXISTS "disco_app_app_settings" CASCADE  (1.5ms) CREATE TABLE "disco_app_app_settings" ("id" bigserial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) DROP TABLE IF EXISTS "disco_app_application_charges" CASCADE  (2.3ms) CREATE TABLE "disco_app_application_charges" ("id" bigserial primary key, "shop_id" bigint, "subscription_id" bigint, "status" integer DEFAULT 0, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "shopify_id" bigint, "confirmation_url" character varying)  (0.3ms) DROP TABLE IF EXISTS "disco_app_flow_actions" CASCADE  (2.4ms) CREATE TABLE "disco_app_flow_actions" ("id" bigserial primary key, "shop_id" bigint, "action_id" character varying, "action_run_id" character varying, "properties" jsonb DEFAULT '{}', "status" integer DEFAULT 0, "processed_at" timestamp, "processing_errors" jsonb DEFAULT '[]', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE UNIQUE INDEX "index_disco_app_flow_actions_on_action_run_id" ON "disco_app_flow_actions" ("action_run_id")  (0.2ms) DROP TABLE IF EXISTS "disco_app_flow_triggers" CASCADE  (2.6ms) CREATE TABLE "disco_app_flow_triggers" ("id" bigserial primary key, "shop_id" bigint, "title" character varying, "resource_name" character varying, "resource_url" character varying, "properties" jsonb DEFAULT '{}', "status" integer DEFAULT 0, "processed_at" timestamp, "processing_errors" jsonb DEFAULT '[]', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.3ms) DROP TABLE IF EXISTS "disco_app_plan_codes" CASCADE  (2.3ms) CREATE TABLE "disco_app_plan_codes" ("id" bigserial primary key, "plan_id" bigint, "code" character varying, "trial_period_days" integer, "amount" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "status" integer DEFAULT 0)  (0.3ms) DROP TABLE IF EXISTS "disco_app_plans" CASCADE  (2.9ms) CREATE TABLE "disco_app_plans" ("id" bigserial primary key, "status" integer DEFAULT 0, "name" character varying, "plan_type" integer DEFAULT 0, "trial_period_days" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "amount" integer DEFAULT 0, "currency" character varying DEFAULT 'USD', "interval" integer DEFAULT 0, "interval_count" integer DEFAULT 1)  (0.3ms) DROP TABLE IF EXISTS "disco_app_recurring_application_charges" CASCADE  (2.0ms) CREATE TABLE "disco_app_recurring_application_charges" ("id" bigserial primary key, "shop_id" bigint, "subscription_id" bigint, "status" integer DEFAULT 0, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "shopify_id" bigint, "confirmation_url" character varying)  (0.2ms) DROP TABLE IF EXISTS "disco_app_sessions" CASCADE  (2.4ms) CREATE TABLE "disco_app_sessions" ("id" bigserial primary key, "session_id" character varying NOT NULL, "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "shop_id" integer)  (0.7ms) CREATE UNIQUE INDEX "index_disco_app_sessions_on_session_id" ON "disco_app_sessions" ("session_id")  (0.8ms) CREATE INDEX "index_disco_app_sessions_on_updated_at" ON "disco_app_sessions" ("updated_at")  (0.1ms) DROP TABLE IF EXISTS "disco_app_shops" CASCADE  (2.5ms) CREATE TABLE "disco_app_shops" ("id" bigserial primary key, "shopify_domain" character varying NOT NULL, "shopify_token" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "status" integer DEFAULT 0, "domain" character varying, "plan_name" character varying, "name" character varying, "data" jsonb DEFAULT '{}')  (0.8ms) CREATE UNIQUE INDEX "index_disco_app_shops_on_shopify_domain" ON "disco_app_shops" ("shopify_domain")  (0.1ms) DROP TABLE IF EXISTS "disco_app_sources" CASCADE  (2.1ms) CREATE TABLE "disco_app_sources" ("id" bigserial primary key, "source" character varying, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.9ms) CREATE INDEX "index_disco_app_sources_on_source" ON "disco_app_sources" ("source")  (0.2ms) DROP TABLE IF EXISTS "disco_app_subscriptions" CASCADE  (1.8ms) CREATE TABLE "disco_app_subscriptions" ("id" bigserial primary key, "shop_id" integer, "plan_id" integer, "status" integer, "subscription_type" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "trial_start_at" timestamp, "trial_end_at" timestamp, "cancelled_at" timestamp, "amount" integer DEFAULT 0, "plan_code_id" bigint, "trial_period_days" integer, "source_id" bigint)  (0.8ms) CREATE INDEX "index_disco_app_subscriptions_on_plan_id" ON "disco_app_subscriptions" ("plan_id")  (0.6ms) CREATE INDEX "index_disco_app_subscriptions_on_shop_id" ON "disco_app_subscriptions" ("shop_id")  (0.1ms) DROP TABLE IF EXISTS "disco_app_users" CASCADE  (2.0ms) CREATE TABLE "disco_app_users" ("id" bigserial primary key, "shop_id" bigint, "first_name" character varying, "last_name" character varying, "email" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.8ms) CREATE UNIQUE INDEX "index_disco_app_users_on_id_and_shop_id" ON "disco_app_users" ("id", "shop_id")  (0.2ms) DROP TABLE IF EXISTS "js_configurations" CASCADE  (2.0ms) CREATE TABLE "js_configurations" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "label" character varying DEFAULT 'Default', "locale" character varying DEFAULT 'en')  (0.2ms) DROP TABLE IF EXISTS "products" CASCADE  (2.0ms) CREATE TABLE "products" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "data" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) DROP TABLE IF EXISTS "widget_configurations" CASCADE  (2.4ms) CREATE TABLE "widget_configurations" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "label" character varying DEFAULT 'Default', "locale" character varying DEFAULT 'en', "background_color" character varying DEFAULT '#FFFFFF')  (1.7ms) ALTER TABLE "carts" ADD CONSTRAINT "fk_rails_faed68a831" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (0.9ms) ALTER TABLE "disco_app_application_charges" ADD CONSTRAINT "fk_rails_0db59d7de6" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (1.0ms) ALTER TABLE "disco_app_application_charges" ADD CONSTRAINT "fk_rails_2a78d31722" FOREIGN KEY ("subscription_id") REFERENCES "disco_app_subscriptions" ("id")   (0.8ms) ALTER TABLE "disco_app_flow_actions" ADD CONSTRAINT "fk_rails_4640aa9452" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id") ON DELETE CASCADE  (0.8ms) ALTER TABLE "disco_app_flow_triggers" ADD CONSTRAINT "fk_rails_2e38b229ab" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id") ON DELETE CASCADE  (1.0ms) ALTER TABLE "disco_app_plan_codes" ADD CONSTRAINT "fk_rails_d0a909a853" FOREIGN KEY ("plan_id") REFERENCES "disco_app_plans" ("id")   (1.0ms) ALTER TABLE "disco_app_recurring_application_charges" ADD CONSTRAINT "fk_rails_be8ecf206c" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (0.8ms) ALTER TABLE "disco_app_recurring_application_charges" ADD CONSTRAINT "fk_rails_e1ff4c71cc" FOREIGN KEY ("subscription_id") REFERENCES "disco_app_subscriptions" ("id")   (1.0ms) ALTER TABLE "disco_app_sessions" ADD CONSTRAINT "fk_rails_babbf55f7d" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id") ON DELETE CASCADE  (0.8ms) ALTER TABLE "disco_app_subscriptions" ADD CONSTRAINT "fk_rails_a96be2a4bb" FOREIGN KEY ("plan_code_id") REFERENCES "disco_app_plan_codes" ("id")   (0.9ms) ALTER TABLE "disco_app_subscriptions" ADD CONSTRAINT "fk_rails_baa4cade5a" FOREIGN KEY ("source_id") REFERENCES "disco_app_sources" ("id")   (0.8ms) ALTER TABLE "js_configurations" ADD CONSTRAINT "fk_rails_3d59259642" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (0.7ms) ALTER TABLE "products" ADD CONSTRAINT "fk_rails_b169a26347" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (1.1ms) ALTER TABLE "widget_configurations" ADD CONSTRAINT "fk_rails_d4f17b6c5c" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (1.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES (20181229100327)  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES (20150525000000), (20160307182229), (20160530160739), (20161105054746), (20170315062548), (20170315062629), (20170327214540), (20170606160751);   (2.2ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' LIMIT 1  (0.3ms) BEGIN ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'test', '2020-04-14 09:11:14.891727', '2020-04-14 09:11:14.891727') RETURNING "key"  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' LIMIT 1 ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' LIMIT 1  (0.1ms) BEGIN ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '59575457c6c120df7aae4d4f2b771706975e07bb', '2020-04-14 09:11:14.895812', '2020-04-14 09:11:14.895812') RETURNING "key"  (0.4ms) COMMIT  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.2ms) BEGIN  (1.6ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN Fixtures Load (3.9ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 09:11:15.336836', '2020-04-14 09:11:15.336836'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 09:11:15.341637', '2020-04-14 09:11:15.341637', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 09:11:15.341637', '2020-04-14 09:11:15.341637', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 09:11:15.347004', '2020-04-14 09:11:15.347004', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 09:11:15.347004', '2020-04-14 09:11:15.347004', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 09:11:15.349802', '2020-04-14 09:11:15.349802', DEFAULT, DEFAULT, '2020-04-07 09:11:15', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 09:11:15.349802', '2020-04-14 09:11:15.349802', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 09:11:15.352511', '2020-04-14 09:11:15.352511'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 09:11:15.354757', '2020-04-14 09:11:15.354757', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 09:11:15.357011', '2020-04-14 09:11:15.357011', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 09:11:15.357011', '2020-04-14 09:11:15.357011', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 09:11:15.357011', '2020-04-14 09:11:15.357011', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 09:11:15.357011', '2020-04-14 09:11:15.357011', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 09:11:15.357011', '2020-04-14 09:11:15.357011', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 09:11:15.357011', '2020-04-14 09:11:15.357011', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 09:11:15.362166', '2020-04-14 09:11:15.362166'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.4ms) COMMIT  (0.2ms) BEGIN  (1.9ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.2ms) COMMIT  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.8ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:11:15.431386', '2020-04-14 09:11:15.431386', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:11:15.435327', '2020-04-14 09:11:15.435327', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:11:15.454500', '2020-04-14 09:11:15.454500', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 09:11:15.455631', '2020-04-14 09:11:15.455631') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.4ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.8ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:11:15.921988' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] Performing DiscoApp::AppInstalledJob (Job ID: c1b97be7-9dc8-48c0-97c3-b651526b7cf9) from Test(default) enqueued at 2020-04-14T09:11:15Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:11:15.949423' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SynchroniseWebhooksJob] [429565a1-baba-429b-9451-1d866ab5e023] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 429565a1-baba-429b-9451-1d866ab5e023) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SynchroniseWebhooksJob] [429565a1-baba-429b-9451-1d866ab5e023] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 429565a1-baba-429b-9451-1d866ab5e023) from Test(default) in 19.5ms [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SynchroniseCarrierServiceJob] [f94395bc-9ae8-4e3f-844b-ed98982cc010] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: f94395bc-9ae8-4e3f-844b-ed98982cc010) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SynchroniseCarrierServiceJob] [f94395bc-9ae8-4e3f-844b-ed98982cc010] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: f94395bc-9ae8-4e3f-844b-ed98982cc010) from Test(default) in 5.01ms [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::ShopUpdateJob] [c15f37d1-443c-4705-8265-aeb89dedeba7] Performing DiscoApp::ShopUpdateJob (Job ID: c15f37d1-443c-4705-8265-aeb89dedeba7) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::ShopUpdateJob] [c15f37d1-443c-4705-8265-aeb89dedeba7]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::ShopUpdateJob] [c15f37d1-443c-4705-8265-aeb89dedeba7] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::ShopUpdateJob] [c15f37d1-443c-4705-8265-aeb89dedeba7] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::ShopUpdateJob] [c15f37d1-443c-4705-8265-aeb89dedeba7]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::ShopUpdateJob] [c15f37d1-443c-4705-8265-aeb89dedeba7] Performed DiscoApp::ShopUpdateJob (Job ID: c15f37d1-443c-4705-8265-aeb89dedeba7) from Test(default) in 22.46ms [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:16.012062' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:11:16.015057', '2020-04-14 09:11:16.015057') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857542 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SubscriptionChangedJob] [4acd07de-4491-458b-b4a5-ab1819ea9a92] Performing DiscoApp::SubscriptionChangedJob (Job ID: 4acd07de-4491-458b-b4a5-ab1819ea9a92) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SubscriptionChangedJob] [4acd07de-4491-458b-b4a5-ab1819ea9a92] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SubscriptionChangedJob] [4acd07de-4491-458b-b4a5-ab1819ea9a92] [DiscoApp::SendSubscriptionJob] [cd1dc2f3-415b-4027-8c23-09ab7ace48f1] Performing DiscoApp::SendSubscriptionJob (Job ID: cd1dc2f3-415b-4027-8c23-09ab7ace48f1) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SubscriptionChangedJob] [4acd07de-4491-458b-b4a5-ab1819ea9a92] [DiscoApp::SendSubscriptionJob] [cd1dc2f3-415b-4027-8c23-09ab7ace48f1] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SubscriptionChangedJob] [4acd07de-4491-458b-b4a5-ab1819ea9a92] [DiscoApp::SendSubscriptionJob] [cd1dc2f3-415b-4027-8c23-09ab7ace48f1] DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SubscriptionChangedJob] [4acd07de-4491-458b-b4a5-ab1819ea9a92] [DiscoApp::SendSubscriptionJob] [cd1dc2f3-415b-4027-8c23-09ab7ace48f1] Performed DiscoApp::SendSubscriptionJob (Job ID: cd1dc2f3-415b-4027-8c23-09ab7ace48f1) from Test(default) in 191.09ms [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SubscriptionChangedJob] [4acd07de-4491-458b-b4a5-ab1819ea9a92] Enqueued DiscoApp::SendSubscriptionJob (Job ID: cd1dc2f3-415b-4027-8c23-09ab7ace48f1) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] [DiscoApp::SubscriptionChangedJob] [4acd07de-4491-458b-b4a5-ab1819ea9a92] Performed DiscoApp::SubscriptionChangedJob (Job ID: 4acd07de-4491-458b-b4a5-ab1819ea9a92) from Test(default) in 193.36ms [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 4acd07de-4491-458b-b4a5-ab1819ea9a92) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:16.215249' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c1b97be7-9dc8-48c0-97c3-b651526b7cf9] Performed DiscoApp::AppInstalledJob (Job ID: c1b97be7-9dc8-48c0-97c3-b651526b7cf9) from Test(default) in 284.57ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: c1b97be7-9dc8-48c0-97c3-b651526b7cf9) to Test(default) with arguments: #> DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.4ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (3.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (1.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.4ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:11:16.237958' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] Performing DiscoApp::AppInstalledJob (Job ID: ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:11:16.244501' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SynchroniseWebhooksJob] [87142398-8e9c-4aac-b349-4b31b7bbe602] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 87142398-8e9c-4aac-b349-4b31b7bbe602) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SynchroniseWebhooksJob] [87142398-8e9c-4aac-b349-4b31b7bbe602] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 87142398-8e9c-4aac-b349-4b31b7bbe602) from Test(default) in 69.93ms [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SynchroniseCarrierServiceJob] [da212a08-b85f-40ee-bea6-da32ea803656] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: da212a08-b85f-40ee-bea6-da32ea803656) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SynchroniseCarrierServiceJob] [da212a08-b85f-40ee-bea6-da32ea803656] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: da212a08-b85f-40ee-bea6-da32ea803656) from Test(default) in 23.19ms [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::ShopUpdateJob] [ccffe48c-15e7-460f-9877-5df620871496] Performing DiscoApp::ShopUpdateJob (Job ID: ccffe48c-15e7-460f-9877-5df620871496) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::ShopUpdateJob] [ccffe48c-15e7-460f-9877-5df620871496]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::ShopUpdateJob] [ccffe48c-15e7-460f-9877-5df620871496] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::ShopUpdateJob] [ccffe48c-15e7-460f-9877-5df620871496] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::ShopUpdateJob] [ccffe48c-15e7-460f-9877-5df620871496]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::ShopUpdateJob] [ccffe48c-15e7-460f-9877-5df620871496] Performed DiscoApp::ShopUpdateJob (Job ID: ccffe48c-15e7-460f-9877-5df620871496) from Test(default) in 5.66ms [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:16.347414' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 09:11:16.358257', '2020-04-14 09:11:16.358257', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857543 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SubscriptionChangedJob] [5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59] Performing DiscoApp::SubscriptionChangedJob (Job ID: 5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SubscriptionChangedJob] [5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SubscriptionChangedJob] [5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59] [DiscoApp::SendSubscriptionJob] [ba2482fb-1556-435a-9c0f-f88f416667b0] Performing DiscoApp::SendSubscriptionJob (Job ID: ba2482fb-1556-435a-9c0f-f88f416667b0) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SubscriptionChangedJob] [5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59] [DiscoApp::SendSubscriptionJob] [ba2482fb-1556-435a-9c0f-f88f416667b0] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SubscriptionChangedJob] [5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59] [DiscoApp::SendSubscriptionJob] [ba2482fb-1556-435a-9c0f-f88f416667b0] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SubscriptionChangedJob] [5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59] [DiscoApp::SendSubscriptionJob] [ba2482fb-1556-435a-9c0f-f88f416667b0] Performed DiscoApp::SendSubscriptionJob (Job ID: ba2482fb-1556-435a-9c0f-f88f416667b0) from Test(default) in 13.48ms [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SubscriptionChangedJob] [5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59] Enqueued DiscoApp::SendSubscriptionJob (Job ID: ba2482fb-1556-435a-9c0f-f88f416667b0) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] [DiscoApp::SubscriptionChangedJob] [5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59] Performed DiscoApp::SubscriptionChangedJob (Job ID: 5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59) from Test(default) in 15.14ms [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 5b3592f6-b7a0-4aa1-9d06-a1efc7e80a59) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:16.378647' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89] Performed DiscoApp::AppInstalledJob (Job ID: ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89) from Test(default) in 137.77ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: ec3979cb-2a48-4d26-ba5c-a2f7fa49ad89) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:11:16.391404' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] Performing DiscoApp::AppInstalledJob (Job ID: 232b43c5-8240-4e25-94ca-43c3821ef4bd) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:11:16.395030' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SynchroniseWebhooksJob] [1ea0d0e5-0c87-41f0-9947-6252c4559d64] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 1ea0d0e5-0c87-41f0-9947-6252c4559d64) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SynchroniseWebhooksJob] [1ea0d0e5-0c87-41f0-9947-6252c4559d64] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 1ea0d0e5-0c87-41f0-9947-6252c4559d64) from Test(default) in 13.5ms [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SynchroniseCarrierServiceJob] [5781d3f1-f414-4116-80c2-bcb998db8ff3] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 5781d3f1-f414-4116-80c2-bcb998db8ff3) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SynchroniseCarrierServiceJob] [5781d3f1-f414-4116-80c2-bcb998db8ff3] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 5781d3f1-f414-4116-80c2-bcb998db8ff3) from Test(default) in 4.33ms [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::ShopUpdateJob] [7b24b7cf-6bc1-40bc-83e6-7d5bbc1cf4bd] Performing DiscoApp::ShopUpdateJob (Job ID: 7b24b7cf-6bc1-40bc-83e6-7d5bbc1cf4bd) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::ShopUpdateJob] [7b24b7cf-6bc1-40bc-83e6-7d5bbc1cf4bd]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::ShopUpdateJob] [7b24b7cf-6bc1-40bc-83e6-7d5bbc1cf4bd] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::ShopUpdateJob] [7b24b7cf-6bc1-40bc-83e6-7d5bbc1cf4bd] DiscoApp::Shop Update (1.0ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::ShopUpdateJob] [7b24b7cf-6bc1-40bc-83e6-7d5bbc1cf4bd]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::ShopUpdateJob] [7b24b7cf-6bc1-40bc-83e6-7d5bbc1cf4bd] Performed DiscoApp::ShopUpdateJob (Job ID: 7b24b7cf-6bc1-40bc-83e6-7d5bbc1cf4bd) from Test(default) in 6.84ms [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:16.423589' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:11:16.424643', '2020-04-14 09:11:16.424643') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857544 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SubscriptionChangedJob] [2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3] Performing DiscoApp::SubscriptionChangedJob (Job ID: 2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SubscriptionChangedJob] [2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SubscriptionChangedJob] [2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3] [DiscoApp::SendSubscriptionJob] [488412cf-3c2f-4055-86ed-27734bfc10d8] Performing DiscoApp::SendSubscriptionJob (Job ID: 488412cf-3c2f-4055-86ed-27734bfc10d8) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SubscriptionChangedJob] [2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3] [DiscoApp::SendSubscriptionJob] [488412cf-3c2f-4055-86ed-27734bfc10d8] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SubscriptionChangedJob] [2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3] [DiscoApp::SendSubscriptionJob] [488412cf-3c2f-4055-86ed-27734bfc10d8] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SubscriptionChangedJob] [2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3] [DiscoApp::SendSubscriptionJob] [488412cf-3c2f-4055-86ed-27734bfc10d8] Performed DiscoApp::SendSubscriptionJob (Job ID: 488412cf-3c2f-4055-86ed-27734bfc10d8) from Test(default) in 14.35ms [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SubscriptionChangedJob] [2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 488412cf-3c2f-4055-86ed-27734bfc10d8) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] [DiscoApp::SubscriptionChangedJob] [2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3] Performed DiscoApp::SubscriptionChangedJob (Job ID: 2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3) from Test(default) in 15.67ms [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 2e68ef22-6fc1-4d68-88d3-867b5f2a7bd3) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:16.445502' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [232b43c5-8240-4e25-94ca-43c3821ef4bd] Performed DiscoApp::AppInstalledJob (Job ID: 232b43c5-8240-4e25-94ca-43c3821ef4bd) from Test(default) in 52.87ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 232b43c5-8240-4e25-94ca-43c3821ef4bd) to Test(default) with arguments: #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [5f902110-be1d-4737-9c15-4bf1e8b2b281] Performing DiscoApp::SendSubscriptionJob (Job ID: 5f902110-be1d-4737-9c15-4bf1e8b2b281) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [5f902110-be1d-4737-9c15-4bf1e8b2b281] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [5f902110-be1d-4737-9c15-4bf1e8b2b281] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [5f902110-be1d-4737-9c15-4bf1e8b2b281] Performed DiscoApp::SendSubscriptionJob (Job ID: 5f902110-be1d-4737-9c15-4bf1e8b2b281) from Test(default) in 16.44ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 5f902110-be1d-4737-9c15-4bf1e8b2b281) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 1.5ms | Allocations: 312) Completed 404 Not Found in 12ms (Views: 10.3ms | ActiveRecord: 0.3ms | Allocations: 3596)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 169)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.3ms | Allocations: 555)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [8c57c334-1803-4ad1-9599-68d444fa4491] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 8c57c334-1803-4ad1-9599-68d444fa4491) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [8c57c334-1803-4ad1-9599-68d444fa4491] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 8c57c334-1803-4ad1-9599-68d444fa4491) from Test(default) in 19.04ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 8c57c334-1803-4ad1-9599-68d444fa4491) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [b8ab914f-7e0a-46fe-bd9d-a2314f0e4c4b] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: b8ab914f-7e0a-46fe-bd9d-a2314f0e4c4b) from Test(default) enqueued at 2020-04-14T09:11:16Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [b8ab914f-7e0a-46fe-bd9d-a2314f0e4c4b] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: b8ab914f-7e0a-46fe-bd9d-a2314f0e4c4b) from Test(default) in 14.45ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: b8ab914f-7e0a-46fe-bd9d-a2314f0e4c4b) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.5ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.5ms | Allocations: 126)  (0.2ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.4ms | Allocations: 115)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.4ms | Allocations: 92)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 JsConfiguration Update (0.3ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 08a9482c-9524-4d19-9c3f-2e4bb3a0963c) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 868dc405-b0f9-44c0-8ac6-bc264657eb53) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 4a644429-ac83-49f6-89b5-eaeecdf53924) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (1.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 7fae23ba-8ace-4ea5-82ff-5fdd513ce396) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.7ms | Allocations: 110) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.5ms | Allocations: 147)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 763e8271-e754-4b2d-be93-28988a861868) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: cb1a82fc-25b0-46a7-ba4f-c65f53b18ffe) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 7aadc97f-e114-412e-b7b3-25cb1eb1a53d) to Test(default) with arguments: #>, #>, "widget_assets"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 415)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:11:17.491619' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 590b4af1-57df-4bec-ae37-804e9416adc3) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 1.2ms | Allocations: 2280)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:11:17.498916' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 34c5269d-4927-4767-ad35-a8a69cbc1390) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms | Allocations: 2066)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:11:17.508245' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] Performing DiscoApp::AppUninstalledJob (Job ID: c6c97d2a-b069-41b6-b3b3-26c94c61fd4b) from Test(default) enqueued at 2020-04-14T09:11:17Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:11:17.511841' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] DiscoApp::RecurringApplicationCharge Update All (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] [DiscoApp::SendSubscriptionJob] [e4803a29-00ee-4d85-b473-ac112e4d6fcf] Performing DiscoApp::SendSubscriptionJob (Job ID: e4803a29-00ee-4d85-b473-ac112e4d6fcf) from Test(default) enqueued at 2020-04-14T09:11:17Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] [DiscoApp::SendSubscriptionJob] [e4803a29-00ee-4d85-b473-ac112e4d6fcf] DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] [DiscoApp::SendSubscriptionJob] [e4803a29-00ee-4d85-b473-ac112e4d6fcf] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] [DiscoApp::SendSubscriptionJob] [e4803a29-00ee-4d85-b473-ac112e4d6fcf] Performed DiscoApp::SendSubscriptionJob (Job ID: e4803a29-00ee-4d85-b473-ac112e4d6fcf) from Test(default) in 15.99ms [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] Enqueued DiscoApp::SendSubscriptionJob (Job ID: e4803a29-00ee-4d85-b473-ac112e4d6fcf) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:11:17.536667', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:11:17.538725' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c6c97d2a-b069-41b6-b3b3-26c94c61fd4b] Performed DiscoApp::AppUninstalledJob (Job ID: c6c97d2a-b069-41b6-b3b3-26c94c61fd4b) from Test(default) in 29.28ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: c6c97d2a-b069-41b6-b3b3-26c94c61fd4b) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:11:17.543646' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] Performing DiscoApp::AppUninstalledJob (Job ID: 063a98d4-7261-48a1-90ed-cb27a0458b51) from Test(default) enqueued at 2020-04-14T09:11:17Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:11:17.547051' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] [DiscoApp::SendSubscriptionJob] [c965b4ad-c456-414d-ba23-cc6119e25b4c] Performing DiscoApp::SendSubscriptionJob (Job ID: c965b4ad-c456-414d-ba23-cc6119e25b4c) from Test(default) enqueued at 2020-04-14T09:11:17Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] [DiscoApp::SendSubscriptionJob] [c965b4ad-c456-414d-ba23-cc6119e25b4c] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] [DiscoApp::SendSubscriptionJob] [c965b4ad-c456-414d-ba23-cc6119e25b4c] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] [DiscoApp::SendSubscriptionJob] [c965b4ad-c456-414d-ba23-cc6119e25b4c] Performed DiscoApp::SendSubscriptionJob (Job ID: c965b4ad-c456-414d-ba23-cc6119e25b4c) from Test(default) in 15.14ms [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] Enqueued DiscoApp::SendSubscriptionJob (Job ID: c965b4ad-c456-414d-ba23-cc6119e25b4c) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:11:17.567838', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:11:17.569914' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [063a98d4-7261-48a1-90ed-cb27a0458b51] Performed DiscoApp::AppUninstalledJob (Job ID: 063a98d4-7261-48a1-90ed-cb27a0458b51) from Test(default) in 25.48ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 063a98d4-7261-48a1-90ed-cb27a0458b51) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:17.580517' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:11:17.586419' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 3ca45c3c-415f-4a26-ae0d-7dedd844da5b) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 6ms (ActiveRecord: 1.8ms | Allocations: 2098) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.3ms | Allocations: 662)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:11:17.595768' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 512)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:11:17.604328' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 75c61044-31db-45de-aeaf-d387e4011e74) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.2ms | Allocations: 1877) DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:17.608931' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 661)  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:11:17.615397' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.6ms | Allocations: 85) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 5837ms (ActiveRecord: 0.6ms | Allocations: 1936881)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.7ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:11:23.477035', '2020-04-14 09:11:23.477035') RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:11:23.486184', '2020-04-14 09:11:23.486184') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 2  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:11:23.511395', '2020-04-14 09:11:23.511395') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 3  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:11:23.516689', '2020-04-14 09:11:23.516689') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 4  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:11:23.542590', '2020-04-14 09:11:23.542590') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 255bc413-5e07-4765-89a6-82ccae1fa560) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 5 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 5 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:11:23.550077', '2020-04-14 09:11:23.550077') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: ce6bda93-1877-4455-afb1-4c5829698938) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:23.562750' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.3ms | Allocations: 454) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1804ms (ActiveRecord: 1.5ms | Allocations: 4438)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.6ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.382770' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:11:25.400377' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.406937' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 17ms (ActiveRecord: 3.3ms | Allocations: 13052) DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.414529' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:11:25.425020' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 8ms (ActiveRecord: 1.8ms | Allocations: 5680)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.431074' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 415)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.438055' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 6ms (ActiveRecord: 1.6ms | Allocations: 1900)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.451385' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 3ms (ActiveRecord: 0.9ms | Allocations: 1243)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.460336' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 8ms (ActiveRecord: 1.6ms | Allocations: 5491)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.477239' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:11:25.485273', '2020-04-14 09:11:25.485273') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 09:11:25.491524', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 12ms (ActiveRecord: 2.6ms | Allocations: 7526)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.500177' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:11:25.503814' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 480)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:25.513411' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 1.7ms | Allocations: 1596)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [26df7d03-f003-4999-8646-1165b7bc5b73] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 26df7d03-f003-4999-8646-1165b7bc5b73) from Test(default) enqueued at 2020-04-14T09:11:25Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [26df7d03-f003-4999-8646-1165b7bc5b73] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 26df7d03-f003-4999-8646-1165b7bc5b73) from Test(default) in 4.61ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: 26df7d03-f003-4999-8646-1165b7bc5b73) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (1.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:11:25.549590', '2020-04-14 09:11:25.549590') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: a4f2ba60-42a7-4ab8-a834-bbcf18a671e2) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:11:25.557331', '2020-04-14 09:11:25.557331') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: b23f9602-be3e-4227-b10f-bbbeb0d4bc4b) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.3ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 2 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.7ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 2 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:11:25 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [b8d27d2c-b343-495b-8e1b-3f38c5fab0d8] Performing ProductsCreateJob (Job ID: b8d27d2c-b343-495b-8e1b-3f38c5fab0d8) from Test(default) enqueued at 2020-04-14T09:11:25Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [b8d27d2c-b343-495b-8e1b-3f38c5fab0d8] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [b8d27d2c-b343-495b-8e1b-3f38c5fab0d8] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [b8d27d2c-b343-495b-8e1b-3f38c5fab0d8]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [b8d27d2c-b343-495b-8e1b-3f38c5fab0d8] Product Create (0.5ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 09:11:25.620928', '2020-04-14 09:11:25.620928') RETURNING "id" [ActiveJob] [ProductsCreateJob] [b8d27d2c-b343-495b-8e1b-3f38c5fab0d8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [b8d27d2c-b343-495b-8e1b-3f38c5fab0d8] Performed ProductsCreateJob (Job ID: b8d27d2c-b343-495b-8e1b-3f38c5fab0d8) from Test(default) in 8.34ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: b8d27d2c-b343-495b-8e1b-3f38c5fab0d8) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 13ms (Views: 0.3ms | ActiveRecord: 1.7ms | Allocations: 12933) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:11:25 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [578d6342-7031-4567-ab17-808bb0a7514b] Performing ProductsUpdateJob (Job ID: 578d6342-7031-4567-ab17-808bb0a7514b) from Test(default) enqueued at 2020-04-14T09:11:25Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [578d6342-7031-4567-ab17-808bb0a7514b] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [578d6342-7031-4567-ab17-808bb0a7514b] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [578d6342-7031-4567-ab17-808bb0a7514b]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [578d6342-7031-4567-ab17-808bb0a7514b] Product Update (0.6ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:11:25.638250' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [578d6342-7031-4567-ab17-808bb0a7514b]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [578d6342-7031-4567-ab17-808bb0a7514b] Performed ProductsUpdateJob (Job ID: 578d6342-7031-4567-ab17-808bb0a7514b) from Test(default) in 4.72ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: 578d6342-7031-4567-ab17-808bb0a7514b) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.6ms | Allocations: 8449) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:11:25 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [58534c3b-2836-4255-83d0-1916d86961ce] Performing ProductsDeleteJob (Job ID: 58534c3b-2836-4255-83d0-1916d86961ce) from Test(default) enqueued at 2020-04-14T09:11:25Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [58534c3b-2836-4255-83d0-1916d86961ce] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [58534c3b-2836-4255-83d0-1916d86961ce] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [58534c3b-2836-4255-83d0-1916d86961ce]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [58534c3b-2836-4255-83d0-1916d86961ce] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [58534c3b-2836-4255-83d0-1916d86961ce]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [58534c3b-2836-4255-83d0-1916d86961ce] Performed ProductsDeleteJob (Job ID: 58534c3b-2836-4255-83d0-1916d86961ce) from Test(default) in 3.37ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: 58534c3b-2836-4255-83d0-1916d86961ce) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 7ms (Views: 0.6ms | ActiveRecord: 1.4ms | Allocations: 1697)  (0.2ms) SELECT COUNT(*) FROM "products"  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:11:25 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [310af005-92f1-420e-bba8-aa6c53265adf] Performing CartsUpdateJob (Job ID: 310af005-92f1-420e-bba8-aa6c53265adf) from Test(default) enqueued at 2020-04-14T09:11:25Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [310af005-92f1-420e-bba8-aa6c53265adf] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [310af005-92f1-420e-bba8-aa6c53265adf] Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [310af005-92f1-420e-bba8-aa6c53265adf]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [310af005-92f1-420e-bba8-aa6c53265adf] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 09:11:25.679128' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [310af005-92f1-420e-bba8-aa6c53265adf]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [310af005-92f1-420e-bba8-aa6c53265adf] Performed CartsUpdateJob (Job ID: 310af005-92f1-420e-bba8-aa6c53265adf) from Test(default) in 11.45ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: 310af005-92f1-420e-bba8-aa6c53265adf) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 16ms (Views: 0.2ms | ActiveRecord: 1.2ms | Allocations: 6342) Cart Load (0.4ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Product Update (0.5ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:11:25.693004' WHERE "products"."id" = 632910393  (0.2ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.4ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:25.704582' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:11:25.704582', '2020-04-14 09:11:25.704582', '2020-04-14 09:11:25.704582', '2020-05-12 09:11:25.704582', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 2e21bc4d-fe36-41ee-bcc9-d37a23f6e1e2) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:25.722862' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:11:25.722862', '2020-04-14 09:11:25.722862', '2020-04-14 09:11:25.722862', '2020-05-12 09:11:25.722862', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 7f9bbb12-ad7d-40ff-a979-953c09a7527e) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.5ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:25.734444' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:11:25.734444', '2020-04-14 09:11:25.734444', '2020-04-14 09:11:25.734444', '2020-06-13 09:11:25.734444', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 256894b4-d5fb-458b-b369-455d37234129) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.5ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:25.747757' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:11:25.747757', '2020-04-14 09:11:25.747757', '2020-04-14 09:11:25.747757', '2020-05-12 09:11:25.747757', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: c7a2b939-98c8-4133-bacb-a8bed8cd32df) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857548 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857548 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:25.769446' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 09:11:25.769446', '2020-04-14 09:11:25.769446') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d0a56dfb-45bf-49fc-9ef4-6869a9dfa460) to Test(default) with arguments: #>, #>  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:25.777310' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:11:25.777310', '2020-04-14 09:11:25.777310', '2020-04-14 09:11:25.777310', '2020-05-12 09:11:25.777310', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: adfa2821-71eb-4de0-970c-320acff0cb82) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 428)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a] Performing DiscoApp::SynchroniseUsersJob (Job ID: 1a7ce6d7-10fc-4d08-b78b-2aecf59e367a) from Test(default) enqueued at 2020-04-14T09:11:25Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a] DiscoApp::User Load (1.6ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a] DiscoApp::User Create (0.4ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 09:11:25.842458', '2020-04-14 09:11:25.842458') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 09:11:25.844318' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 09:11:25.846576', '2020-04-14 09:11:25.846576') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 09:11:25.847878' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [1a7ce6d7-10fc-4d08-b78b-2aecf59e367a] Performed DiscoApp::SynchroniseUsersJob (Job ID: 1a7ce6d7-10fc-4d08-b78b-2aecf59e367a) from Test(default) in 28.37ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: 1a7ce6d7-10fc-4d08-b78b-2aecf59e367a) to Test(default) with arguments: #> DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:11:25.861138' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.5ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.3ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 09:11:25.896864', '2020-04-14 09:11:25.896864') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:11:25.911232', '2020-04-14 09:11:25.911232') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:11:25.928105' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:11:25.952999' WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:11:25.967256' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.6ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:11:26.004014' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.4ms | Allocations: 617)  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.7ms | Allocations: 113) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1805ms (ActiveRecord: 2.4ms | Allocations: 5003)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:27.843616' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 09:11:27.845581' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.7ms | Allocations: 912)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:11:27.858114' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:27.868861' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 13) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1790ms (ActiveRecord: 1.9ms | Allocations: 4264)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:11:29.668096' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 217)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:29.680980' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 7ms (ActiveRecord: 1.9ms | Allocations: 2625)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:11:29.696612' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:29.703452' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:11:29.704631' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 7ms (ActiveRecord: 2.1ms | Allocations: 2591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:11:29.718430' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:11:29.725370' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:29.732048' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 877)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (66.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:11:29.843286', '2020-04-14 09:11:29.843286') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 3  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:11:29.849476', '2020-04-14 09:11:29.849476') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 4  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:11:29.854251', '2020-04-14 09:11:29.854251') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 5  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 5  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:11:29.861396', '2020-04-14 09:11:29.861396') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 6  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 09:11:29.867639' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 09:11:29.870520' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:29.882407' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.5ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:29.893795' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:11:29.895098', '2020-04-14 09:11:29.895098', '2020-04-14 09:11:29.894628', '2020-05-12 09:11:29.894651', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 14281e34-94bf-4481-b156-4a6e60f9d54c) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 8ms (ActiveRecord: 2.2ms | Allocations: 3211) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:29.904214' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 214)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:29.909425' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:29.916517' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.5ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:11:29.918892', '2020-04-14 09:11:29.918892', '2020-04-14 09:11:29.918364', '2020-06-13 09:11:29.918383', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 5ae29613-ed40-4d0e-9fb2-ed2ad6a05f90) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 12ms (ActiveRecord: 3.3ms | Allocations: 4387) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:29.928804' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 2415) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:29.941014' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:11:29.943029' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 479)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:29.951037' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.4ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 7.6ms | Allocations: 3068) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1800ms (ActiveRecord: 1.6ms | Allocations: 6325)  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:31.764643' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 4.8ms | Allocations: 2854) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1804ms (ActiveRecord: 2.4ms | Allocations: 6792)  (0.4ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:11:33.578638' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.5ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:11:33.588977' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:11:33.590743', '2020-04-14 09:11:33.590743', '2020-04-14 09:11:33.589948', '2020-05-12 09:11:33.589975', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 1d53230f-6126-4764-99f2-7acf5b34dcad) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 13ms (ActiveRecord: 3.2ms | Allocations: 4102) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.2ms) BEGIN  (1.2ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.5ms) COMMIT  (0.2ms) BEGIN Fixtures Load (2.7ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 09:15:52.772646', '2020-04-14 09:15:52.772646'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 09:15:52.776988', '2020-04-14 09:15:52.776988', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 09:15:52.776988', '2020-04-14 09:15:52.776988', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 09:15:52.782693', '2020-04-14 09:15:52.782693', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 09:15:52.782693', '2020-04-14 09:15:52.782693', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 09:15:52.785330', '2020-04-14 09:15:52.785330', DEFAULT, DEFAULT, '2020-04-07 09:15:52', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 09:15:52.785330', '2020-04-14 09:15:52.785330', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 09:15:52.788328', '2020-04-14 09:15:52.788328'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 09:15:52.790628', '2020-04-14 09:15:52.790628', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 09:15:52.793166', '2020-04-14 09:15:52.793166', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 09:15:52.793166', '2020-04-14 09:15:52.793166', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 09:15:52.793166', '2020-04-14 09:15:52.793166', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 09:15:52.793166', '2020-04-14 09:15:52.793166', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 09:15:52.793166', '2020-04-14 09:15:52.793166', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 09:15:52.793166', '2020-04-14 09:15:52.793166', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 09:15:52.797956', '2020-04-14 09:15:52.797956'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.8ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.2ms) COMMIT  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 0dfe869f-c2ca-4d53-a633-a137867631b4) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: f1542120-0e91-4dbb-893f-93e7730590d9) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: c7fa6aa9-a7cf-4304-a753-7bd7b9e41ed3) to Test(default) with arguments: #>, #>, "widget_assets"  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 1.4ms | Allocations: 350)  (0.3ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.4ms | Allocations: 91)  (0.4ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.5ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.5ms | Allocations: 114)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 4cf99886-e8d8-497b-8cac-2f2bda407058) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 700b83a3-829e-4168-be13-405952969664) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.4ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 329d32fc-2596-4967-81f8-cb5a5060d53a) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 55e83a6a-5679-4754-b06d-6548fd499569) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.5ms | Allocations: 110) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.6ms | Allocations: 147)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:15:53.790353' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] Performing DiscoApp::AppUninstalledJob (Job ID: c5b95623-5a3e-4c7c-8030-acb4437cb0c1) from Test(default) enqueued at 2020-04-14T09:15:53Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:15:53.815447' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] [DiscoApp::SendSubscriptionJob] [f6aead09-9351-43ef-9e8b-db77d0937695] Performing DiscoApp::SendSubscriptionJob (Job ID: f6aead09-9351-43ef-9e8b-db77d0937695) from Test(default) enqueued at 2020-04-14T09:15:53Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] [DiscoApp::SendSubscriptionJob] [f6aead09-9351-43ef-9e8b-db77d0937695] DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] [DiscoApp::SendSubscriptionJob] [f6aead09-9351-43ef-9e8b-db77d0937695] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] [DiscoApp::SendSubscriptionJob] [f6aead09-9351-43ef-9e8b-db77d0937695] Performed DiscoApp::SendSubscriptionJob (Job ID: f6aead09-9351-43ef-9e8b-db77d0937695) from Test(default) in 196.72ms [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] Enqueued DiscoApp::SendSubscriptionJob (Job ID: f6aead09-9351-43ef-9e8b-db77d0937695) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] DiscoApp::Session Destroy (0.4ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:15:54.024007', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:15:54.026131' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c5b95623-5a3e-4c7c-8030-acb4437cb0c1] Performed DiscoApp::AppUninstalledJob (Job ID: c5b95623-5a3e-4c7c-8030-acb4437cb0c1) from Test(default) in 228.94ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: c5b95623-5a3e-4c7c-8030-acb4437cb0c1) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:15:54.032168' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] Performing DiscoApp::AppUninstalledJob (Job ID: 552ec769-10fd-463e-a130-aabad63b80a6) from Test(default) enqueued at 2020-04-14T09:15:54Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:15:54.035475' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] [DiscoApp::SendSubscriptionJob] [cc479d4c-a387-4bc3-b79e-119977948c71] Performing DiscoApp::SendSubscriptionJob (Job ID: cc479d4c-a387-4bc3-b79e-119977948c71) from Test(default) enqueued at 2020-04-14T09:15:54Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] [DiscoApp::SendSubscriptionJob] [cc479d4c-a387-4bc3-b79e-119977948c71] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] [DiscoApp::SendSubscriptionJob] [cc479d4c-a387-4bc3-b79e-119977948c71] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] [DiscoApp::SendSubscriptionJob] [cc479d4c-a387-4bc3-b79e-119977948c71] Performed DiscoApp::SendSubscriptionJob (Job ID: cc479d4c-a387-4bc3-b79e-119977948c71) from Test(default) in 28.24ms [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] Enqueued DiscoApp::SendSubscriptionJob (Job ID: cc479d4c-a387-4bc3-b79e-119977948c71) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] DiscoApp::Session Destroy (0.4ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:15:54.069356', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:15:54.071328' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [552ec769-10fd-463e-a130-aabad63b80a6] Performed DiscoApp::AppUninstalledJob (Job ID: 552ec769-10fd-463e-a130-aabad63b80a6) from Test(default) in 37.88ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 552ec769-10fd-463e-a130-aabad63b80a6) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.5ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:15:54.088943', '2020-04-14 09:15:54.088943') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 7  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:15:54.095469', '2020-04-14 09:15:54.095469') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.4ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 8  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:15:54.100535', '2020-04-14 09:15:54.100535') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 9  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 9  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:15:54.107469', '2020-04-14 09:15:54.107469') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 10  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:15:54.115237', '2020-04-14 09:15:54.115237') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: b38f756d-c5e0-4c00-82d2-2d7e5c633343) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 11 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 11 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:15:54.121675', '2020-04-14 09:15:54.121675') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: e911e2d4-bf9f-4a29-8a19-ee091c62dfe3) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 09:15:54.132059' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 09:15:54.135170' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:15:54.139284' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:15:54.139284', '2020-04-14 09:15:54.139284', '2020-04-14 09:15:54.139284', '2020-05-12 09:15:54.139284', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: f65eca3e-3917-49ac-8bd7-951009fb563d) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:15:54.159285' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:15:54.159285', '2020-04-14 09:15:54.159285', '2020-04-14 09:15:54.159285', '2020-05-12 09:15:54.159285', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 0a2146f6-6442-448a-8e3b-46355a887fc7) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:15:54.166985' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:15:54.166985', '2020-04-14 09:15:54.166985', '2020-04-14 09:15:54.166985', '2020-06-13 09:15:54.166985', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6a6d6f9f-e445-4b1b-baab-c1c87d2ad1eb) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.6ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:15:54.179869' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 09:15:54.179869', '2020-04-14 09:15:54.179869') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: a8e15ed4-bd6e-4399-9d3b-4c9cb54f4848) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:15:54.187195' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:15:54.187195', '2020-04-14 09:15:54.187195', '2020-04-14 09:15:54.187195', '2020-05-12 09:15:54.187195', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: e4d9270a-b13d-46b4-9e36-9986a83b7720) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857546 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857546 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:15:54.196028' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:15:54.196028', '2020-04-14 09:15:54.196028', '2020-04-14 09:15:54.196028', '2020-05-12 09:15:54.196028', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b25ed86d-1eee-44e6-9efa-4a148c244177) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [9d5daefd-a019-4293-8d55-7a8c65a6238c] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 9d5daefd-a019-4293-8d55-7a8c65a6238c) from Test(default) enqueued at 2020-04-14T09:15:54Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [9d5daefd-a019-4293-8d55-7a8c65a6238c] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 9d5daefd-a019-4293-8d55-7a8c65a6238c) from Test(default) in 28.17ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 9d5daefd-a019-4293-8d55-7a8c65a6238c) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [57dc171e-9cd9-46fe-947b-b2b54a4dbf35] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 57dc171e-9cd9-46fe-947b-b2b54a4dbf35) from Test(default) enqueued at 2020-04-14T09:15:54Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [57dc171e-9cd9-46fe-947b-b2b54a4dbf35] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 57dc171e-9cd9-46fe-947b-b2b54a4dbf35) from Test(default) in 19.66ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 57dc171e-9cd9-46fe-947b-b2b54a4dbf35) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:15:54.282055' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:15:54.290386' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 21bef913-3084-4f66-b6e6-93cd9e5b0860) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 7ms (ActiveRecord: 1.5ms | Allocations: 2751) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.3ms | Allocations: 665)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:15:54.302130' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 512)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:15:54.312020' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: a0d8cf50-89b0-4258-b595-207b7191f06d) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.3ms | Allocations: 1877) DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:15:54.317461' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 661)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:15:54.323769' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.6ms | Allocations: 90) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 2348ms (ActiveRecord: 0.3ms | Allocations: 524227)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.7ms | Allocations: 92) Completed 404 Not Found in 6ms (Views: 4.9ms | ActiveRecord: 0.4ms | Allocations: 2015)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.2ms | Allocations: 551)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 166)  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.6ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:15:56.727082', '2020-04-14 09:15:56.727082') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: f77296e2-fd76-4ff9-8d41-74ccd02a6665) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:15:56.733791', '2020-04-14 09:15:56.733791') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 9a01321c-b8fa-44b7-9371-afc734d7dc45) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.5ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 8 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 8 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 173)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 357)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:15:56.774507' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] Performing DiscoApp::AppInstalledJob (Job ID: 70200f01-b8cb-4196-9a63-c9cfa4cbc73d) from Test(default) enqueued at 2020-04-14T09:15:56Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:15:56.778207' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SynchroniseWebhooksJob] [94cfd6a2-2f6c-494a-8cec-00f38b3470b9] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 94cfd6a2-2f6c-494a-8cec-00f38b3470b9) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SynchroniseWebhooksJob] [94cfd6a2-2f6c-494a-8cec-00f38b3470b9] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 94cfd6a2-2f6c-494a-8cec-00f38b3470b9) from Test(default) in 52.42ms [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SynchroniseCarrierServiceJob] [4ba03353-8224-46c4-a754-fb93ba71cf30] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 4ba03353-8224-46c4-a754-fb93ba71cf30) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SynchroniseCarrierServiceJob] [4ba03353-8224-46c4-a754-fb93ba71cf30] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 4ba03353-8224-46c4-a754-fb93ba71cf30) from Test(default) in 7.67ms [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::ShopUpdateJob] [813e9e5e-8a71-4d33-a54d-8d8d439e5e9a] Performing DiscoApp::ShopUpdateJob (Job ID: 813e9e5e-8a71-4d33-a54d-8d8d439e5e9a) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::ShopUpdateJob] [813e9e5e-8a71-4d33-a54d-8d8d439e5e9a]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::ShopUpdateJob] [813e9e5e-8a71-4d33-a54d-8d8d439e5e9a] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::ShopUpdateJob] [813e9e5e-8a71-4d33-a54d-8d8d439e5e9a] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::ShopUpdateJob] [813e9e5e-8a71-4d33-a54d-8d8d439e5e9a]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::ShopUpdateJob] [813e9e5e-8a71-4d33-a54d-8d8d439e5e9a] Performed DiscoApp::ShopUpdateJob (Job ID: 813e9e5e-8a71-4d33-a54d-8d8d439e5e9a) from Test(default) in 13.94ms [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:15:56.860978' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 09:15:56.871034', '2020-04-14 09:15:56.871034', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857548 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SubscriptionChangedJob] [403e476a-1266-4c37-8f88-931a6dc1e972] Performing DiscoApp::SubscriptionChangedJob (Job ID: 403e476a-1266-4c37-8f88-931a6dc1e972) from Test(default) enqueued at 2020-04-14T09:15:56Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SubscriptionChangedJob] [403e476a-1266-4c37-8f88-931a6dc1e972] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SubscriptionChangedJob] [403e476a-1266-4c37-8f88-931a6dc1e972] [DiscoApp::SendSubscriptionJob] [0e4c89c6-fd2b-41b6-840c-3568cf8ee8da] Performing DiscoApp::SendSubscriptionJob (Job ID: 0e4c89c6-fd2b-41b6-840c-3568cf8ee8da) from Test(default) enqueued at 2020-04-14T09:15:56Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SubscriptionChangedJob] [403e476a-1266-4c37-8f88-931a6dc1e972] [DiscoApp::SendSubscriptionJob] [0e4c89c6-fd2b-41b6-840c-3568cf8ee8da] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SubscriptionChangedJob] [403e476a-1266-4c37-8f88-931a6dc1e972] [DiscoApp::SendSubscriptionJob] [0e4c89c6-fd2b-41b6-840c-3568cf8ee8da] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SubscriptionChangedJob] [403e476a-1266-4c37-8f88-931a6dc1e972] [DiscoApp::SendSubscriptionJob] [0e4c89c6-fd2b-41b6-840c-3568cf8ee8da] Performed DiscoApp::SendSubscriptionJob (Job ID: 0e4c89c6-fd2b-41b6-840c-3568cf8ee8da) from Test(default) in 21.2ms [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SubscriptionChangedJob] [403e476a-1266-4c37-8f88-931a6dc1e972] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 0e4c89c6-fd2b-41b6-840c-3568cf8ee8da) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] [DiscoApp::SubscriptionChangedJob] [403e476a-1266-4c37-8f88-931a6dc1e972] Performed DiscoApp::SubscriptionChangedJob (Job ID: 403e476a-1266-4c37-8f88-931a6dc1e972) from Test(default) in 24.91ms [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 403e476a-1266-4c37-8f88-931a6dc1e972) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Shop Exists? (0.9ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:15:56.904141' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [70200f01-b8cb-4196-9a63-c9cfa4cbc73d] Performed DiscoApp::AppInstalledJob (Job ID: 70200f01-b8cb-4196-9a63-c9cfa4cbc73d) from Test(default) in 129.47ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 70200f01-b8cb-4196-9a63-c9cfa4cbc73d) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:15:56.923856' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] Performing DiscoApp::AppInstalledJob (Job ID: 99e49fd0-75ea-4d69-ac97-f60b44fb5bb9) from Test(default) enqueued at 2020-04-14T09:15:56Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9]  (1.7ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:15:56.930604' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SynchroniseWebhooksJob] [e78ea9ad-e5e8-4a66-8642-3ba147240c9c] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: e78ea9ad-e5e8-4a66-8642-3ba147240c9c) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SynchroniseWebhooksJob] [e78ea9ad-e5e8-4a66-8642-3ba147240c9c] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: e78ea9ad-e5e8-4a66-8642-3ba147240c9c) from Test(default) in 40.35ms [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SynchroniseCarrierServiceJob] [4797086e-5d35-4fec-8566-1efd1dbe4fe1] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 4797086e-5d35-4fec-8566-1efd1dbe4fe1) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SynchroniseCarrierServiceJob] [4797086e-5d35-4fec-8566-1efd1dbe4fe1] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 4797086e-5d35-4fec-8566-1efd1dbe4fe1) from Test(default) in 3.53ms [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::ShopUpdateJob] [37be5fc5-670b-41cd-98e9-d0ecddd2135f] Performing DiscoApp::ShopUpdateJob (Job ID: 37be5fc5-670b-41cd-98e9-d0ecddd2135f) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::ShopUpdateJob] [37be5fc5-670b-41cd-98e9-d0ecddd2135f]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::ShopUpdateJob] [37be5fc5-670b-41cd-98e9-d0ecddd2135f] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::ShopUpdateJob] [37be5fc5-670b-41cd-98e9-d0ecddd2135f] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::ShopUpdateJob] [37be5fc5-670b-41cd-98e9-d0ecddd2135f]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::ShopUpdateJob] [37be5fc5-670b-41cd-98e9-d0ecddd2135f] Performed DiscoApp::ShopUpdateJob (Job ID: 37be5fc5-670b-41cd-98e9-d0ecddd2135f) from Test(default) in 5.36ms [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:15:56.984538' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:15:56.985477', '2020-04-14 09:15:56.985477') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857549 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SubscriptionChangedJob] [483aa4d6-36c0-448b-a66f-e35aec9f44b5] Performing DiscoApp::SubscriptionChangedJob (Job ID: 483aa4d6-36c0-448b-a66f-e35aec9f44b5) from Test(default) enqueued at 2020-04-14T09:15:56Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SubscriptionChangedJob] [483aa4d6-36c0-448b-a66f-e35aec9f44b5] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SubscriptionChangedJob] [483aa4d6-36c0-448b-a66f-e35aec9f44b5] [DiscoApp::SendSubscriptionJob] [33d27d13-109e-42a5-9cfe-4e03f6efd8a4] Performing DiscoApp::SendSubscriptionJob (Job ID: 33d27d13-109e-42a5-9cfe-4e03f6efd8a4) from Test(default) enqueued at 2020-04-14T09:15:56Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SubscriptionChangedJob] [483aa4d6-36c0-448b-a66f-e35aec9f44b5] [DiscoApp::SendSubscriptionJob] [33d27d13-109e-42a5-9cfe-4e03f6efd8a4] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SubscriptionChangedJob] [483aa4d6-36c0-448b-a66f-e35aec9f44b5] [DiscoApp::SendSubscriptionJob] [33d27d13-109e-42a5-9cfe-4e03f6efd8a4] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SubscriptionChangedJob] [483aa4d6-36c0-448b-a66f-e35aec9f44b5] [DiscoApp::SendSubscriptionJob] [33d27d13-109e-42a5-9cfe-4e03f6efd8a4] Performed DiscoApp::SendSubscriptionJob (Job ID: 33d27d13-109e-42a5-9cfe-4e03f6efd8a4) from Test(default) in 15.46ms [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SubscriptionChangedJob] [483aa4d6-36c0-448b-a66f-e35aec9f44b5] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 33d27d13-109e-42a5-9cfe-4e03f6efd8a4) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] [DiscoApp::SubscriptionChangedJob] [483aa4d6-36c0-448b-a66f-e35aec9f44b5] Performed DiscoApp::SubscriptionChangedJob (Job ID: 483aa4d6-36c0-448b-a66f-e35aec9f44b5) from Test(default) in 17.14ms [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 483aa4d6-36c0-448b-a66f-e35aec9f44b5) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:15:57.008897' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [99e49fd0-75ea-4d69-ac97-f60b44fb5bb9] Performed DiscoApp::AppInstalledJob (Job ID: 99e49fd0-75ea-4d69-ac97-f60b44fb5bb9) from Test(default) in 83.87ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 99e49fd0-75ea-4d69-ac97-f60b44fb5bb9) to Test(default) with arguments: #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:15:57.019125' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] Performing DiscoApp::AppInstalledJob (Job ID: 699caa1e-3e9c-4ca4-a87a-b5356b0cbab8) from Test(default) enqueued at 2020-04-14T09:15:57Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:15:57.023266' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SynchroniseWebhooksJob] [1c1b1134-d2b7-4ad7-9ee5-60a50939a5c7] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 1c1b1134-d2b7-4ad7-9ee5-60a50939a5c7) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SynchroniseWebhooksJob] [1c1b1134-d2b7-4ad7-9ee5-60a50939a5c7] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 1c1b1134-d2b7-4ad7-9ee5-60a50939a5c7) from Test(default) in 27.04ms [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SynchroniseCarrierServiceJob] [54a4e1b8-0243-4724-8956-767ca6ac213d] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 54a4e1b8-0243-4724-8956-767ca6ac213d) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SynchroniseCarrierServiceJob] [54a4e1b8-0243-4724-8956-767ca6ac213d] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 54a4e1b8-0243-4724-8956-767ca6ac213d) from Test(default) in 19.99ms [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::ShopUpdateJob] [3bb0eae8-e04b-48a0-834b-9691d0828e8f] Performing DiscoApp::ShopUpdateJob (Job ID: 3bb0eae8-e04b-48a0-834b-9691d0828e8f) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::ShopUpdateJob] [3bb0eae8-e04b-48a0-834b-9691d0828e8f]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::ShopUpdateJob] [3bb0eae8-e04b-48a0-834b-9691d0828e8f] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::ShopUpdateJob] [3bb0eae8-e04b-48a0-834b-9691d0828e8f] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::ShopUpdateJob] [3bb0eae8-e04b-48a0-834b-9691d0828e8f]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::ShopUpdateJob] [3bb0eae8-e04b-48a0-834b-9691d0828e8f] Performed DiscoApp::ShopUpdateJob (Job ID: 3bb0eae8-e04b-48a0-834b-9691d0828e8f) from Test(default) in 10.05ms [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:15:57.084452' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:15:57.085691', '2020-04-14 09:15:57.085691') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857550 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SubscriptionChangedJob] [7e6157dc-6df2-4ad1-b39c-7e663b5650d7] Performing DiscoApp::SubscriptionChangedJob (Job ID: 7e6157dc-6df2-4ad1-b39c-7e663b5650d7) from Test(default) enqueued at 2020-04-14T09:15:57Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SubscriptionChangedJob] [7e6157dc-6df2-4ad1-b39c-7e663b5650d7] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SubscriptionChangedJob] [7e6157dc-6df2-4ad1-b39c-7e663b5650d7] [DiscoApp::SendSubscriptionJob] [1536f6a1-391b-4e96-aa9b-c0a57a0f6068] Performing DiscoApp::SendSubscriptionJob (Job ID: 1536f6a1-391b-4e96-aa9b-c0a57a0f6068) from Test(default) enqueued at 2020-04-14T09:15:57Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SubscriptionChangedJob] [7e6157dc-6df2-4ad1-b39c-7e663b5650d7] [DiscoApp::SendSubscriptionJob] [1536f6a1-391b-4e96-aa9b-c0a57a0f6068] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SubscriptionChangedJob] [7e6157dc-6df2-4ad1-b39c-7e663b5650d7] [DiscoApp::SendSubscriptionJob] [1536f6a1-391b-4e96-aa9b-c0a57a0f6068] DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SubscriptionChangedJob] [7e6157dc-6df2-4ad1-b39c-7e663b5650d7] [DiscoApp::SendSubscriptionJob] [1536f6a1-391b-4e96-aa9b-c0a57a0f6068] Performed DiscoApp::SendSubscriptionJob (Job ID: 1536f6a1-391b-4e96-aa9b-c0a57a0f6068) from Test(default) in 15.85ms [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SubscriptionChangedJob] [7e6157dc-6df2-4ad1-b39c-7e663b5650d7] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 1536f6a1-391b-4e96-aa9b-c0a57a0f6068) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] [DiscoApp::SubscriptionChangedJob] [7e6157dc-6df2-4ad1-b39c-7e663b5650d7] Performed DiscoApp::SubscriptionChangedJob (Job ID: 7e6157dc-6df2-4ad1-b39c-7e663b5650d7) from Test(default) in 18.19ms [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 7e6157dc-6df2-4ad1-b39c-7e663b5650d7) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:15:57.110643' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [699caa1e-3e9c-4ca4-a87a-b5356b0cbab8] Performed DiscoApp::AppInstalledJob (Job ID: 699caa1e-3e9c-4ca4-a87a-b5356b0cbab8) from Test(default) in 91.2ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 699caa1e-3e9c-4ca4-a87a-b5356b0cbab8) to Test(default) with arguments: #> DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.6ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:15:57.119691', '2020-04-14 09:15:57.119691') RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 9  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:15:57.152072', '2020-04-14 09:15:57.152072') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 10  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:15:57.159900', '2020-04-14 09:15:57.159900') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 11  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:15:57.165528', '2020-04-14 09:15:57.165528') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 12  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:15:57.203432' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 15.1ms | Allocations: 3665) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1790ms (ActiveRecord: 2.8ms | Allocations: 8115)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:15:59.010422' WHERE "disco_app_shops"."id" = 605094243  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 34.8ms | Allocations: 2305) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1826ms (ActiveRecord: 1.8ms | Allocations: 5195)  (0.4ms) ROLLBACK  (0.3ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:00.852235' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 10ms (ActiveRecord: 2.8ms | Allocations: 2415) DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:00.881721' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:16:00.889945' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:16:00.891882', '2020-04-14 09:16:00.891882', '2020-04-14 09:16:00.891321', '2020-06-13 09:16:00.891342', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 604938d6-8bff-495a-ad03-9d9c45d4d46d) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 11ms (ActiveRecord: 2.8ms | Allocations: 4386) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:00.903326' WHERE "disco_app_shops"."id" = 605094243  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:16:00.913526' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:16:00.914972', '2020-04-14 09:16:00.914972', '2020-04-14 09:16:00.914370', '2020-05-12 09:16:00.914390', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6dc45528-2704-4fbb-86bb-73d749c41552) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 11ms (ActiveRecord: 3.2ms | Allocations: 4102) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:00.925615' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:16:00.935065' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:16:00.936087', '2020-04-14 09:16:00.936087', '2020-04-14 09:16:00.935617', '2020-05-12 09:16:00.935633', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d0122330-ccb9-40f9-b6d3-51bbe31c3a9e) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 8ms (ActiveRecord: 1.7ms | Allocations: 3051) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:00.945553' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:16:00.947885' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 479)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:00.955226' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.0ms | Allocations: 414)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:00.989657' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.5ms | Allocations: 110) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1821ms (ActiveRecord: 1.8ms | Allocations: 4787)  (0.3ms) ROLLBACK  (0.3ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 218)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:16:02.827438' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 480)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:02.838064' WHERE "disco_app_shops"."id" = 605094243  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.4ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 9ms (ActiveRecord: 3.0ms | Allocations: 2626)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:16:02.854689' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:02.862104' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:16:02.863473' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 8ms (ActiveRecord: 2.7ms | Allocations: 2591)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:16:02.878342' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:02.885435' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 911)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:02.895872' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 09:16:02.897002' WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 877)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 22) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1795ms (ActiveRecord: 3.3ms | Allocations: 9327)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:16:04.707497' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:16:04.721544' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 478)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.5ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:16:04.737211', '2020-04-14 09:16:04.737211', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.5ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:16:04.743769', '2020-04-14 09:16:04.743769', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:16:04.747130', '2020-04-14 09:16:04.747130', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 09:16:04.748583', '2020-04-14 09:16:04.748583') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:16:04 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [8413f169-8093-4c40-8fea-4cb32cf1433f] Performing CartsUpdateJob (Job ID: 8413f169-8093-4c40-8fea-4cb32cf1433f) from Test(default) enqueued at 2020-04-14T09:16:04Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [8413f169-8093-4c40-8fea-4cb32cf1433f] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [8413f169-8093-4c40-8fea-4cb32cf1433f] Cart Load (0.4ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [8413f169-8093-4c40-8fea-4cb32cf1433f]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [8413f169-8093-4c40-8fea-4cb32cf1433f] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 09:16:04.814114' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [8413f169-8093-4c40-8fea-4cb32cf1433f]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [8413f169-8093-4c40-8fea-4cb32cf1433f] Performed CartsUpdateJob (Job ID: 8413f169-8093-4c40-8fea-4cb32cf1433f) from Test(default) in 7.88ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: 8413f169-8093-4c40-8fea-4cb32cf1433f) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 12ms (Views: 0.7ms | ActiveRecord: 1.4ms | Allocations: 6545) Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:16:04.829918' WHERE "products"."id" = 632910393  (0.1ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:16:04 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d] Performing ProductsCreateJob (Job ID: 2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d) from Test(default) enqueued at 2020-04-14T09:16:04Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d] Product Create (0.7ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 09:16:04.845017', '2020-04-14 09:16:04.845017') RETURNING "id" [ActiveJob] [ProductsCreateJob] [2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d] Performed ProductsCreateJob (Job ID: 2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d) from Test(default) in 7.14ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 2ea80b80-e2a6-4ac4-90c7-eb4f1cfdff9d) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 1.6ms | Allocations: 12384) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:16:04 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8] Performing ProductsDeleteJob (Job ID: e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8) from Test(default) enqueued at 2020-04-14T09:16:04Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8] Product Destroy (0.3ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8] Performed ProductsDeleteJob (Job ID: e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8) from Test(default) in 2.44ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: e7d7f3b8-2886-4b0f-bb19-a9eb9ba5abc8) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.3ms | Allocations: 1697)  (0.2ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:16:04 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [f885b87e-bcb9-486c-9728-9bb4e39a6290] Performing ProductsUpdateJob (Job ID: f885b87e-bcb9-486c-9728-9bb4e39a6290) from Test(default) enqueued at 2020-04-14T09:16:04Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [f885b87e-bcb9-486c-9728-9bb4e39a6290] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [f885b87e-bcb9-486c-9728-9bb4e39a6290] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [f885b87e-bcb9-486c-9728-9bb4e39a6290]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [f885b87e-bcb9-486c-9728-9bb4e39a6290] Product Update (0.5ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:16:04.873344' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [f885b87e-bcb9-486c-9728-9bb4e39a6290]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [f885b87e-bcb9-486c-9728-9bb4e39a6290] Performed ProductsUpdateJob (Job ID: f885b87e-bcb9-486c-9728-9bb4e39a6290) from Test(default) in 5.94ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: f885b87e-bcb9-486c-9728-9bb4e39a6290) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 10ms (Views: 0.2ms | ActiveRecord: 1.7ms | Allocations: 8449) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416] Performing DiscoApp::SynchroniseUsersJob (Job ID: c958019e-7452-4cee-8a2e-76dff37bb416) from Test(default) enqueued at 2020-04-14T09:16:04Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416] DiscoApp::User Load (0.5ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 09:16:04.900914', '2020-04-14 09:16:04.900914') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 09:16:04.902251' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 09:16:04.904130', '2020-04-14 09:16:04.904130') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 09:16:04.905223' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [c958019e-7452-4cee-8a2e-76dff37bb416] Performed DiscoApp::SynchroniseUsersJob (Job ID: c958019e-7452-4cee-8a2e-76dff37bb416) from Test(default) in 20.4ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: c958019e-7452-4cee-8a2e-76dff37bb416) to Test(default) with arguments: #> DiscoApp::User Load (0.3ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:04.917270' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 351)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:04.925783' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:16:04.928034' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 482)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:04.936159' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 6ms (ActiveRecord: 1.6ms | Allocations: 1903)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:04.950489' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.3ms | Allocations: 430) [Webpacker] Compiling... [Webpacker] Compilation failed: yarn run v1.21.1 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. warning package.json: No license field warning package.json: No license field error Command "webpack" not found. Completed 500 Internal Server Error in 1802ms (ActiveRecord: 1.3ms | Allocations: 4259)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:06.766271' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 4ms (ActiveRecord: 1.1ms | Allocations: 1243)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:06.777546' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:16:06.787101', '2020-04-14 09:16:06.787101') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 09:16:06.794296', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 14ms (ActiveRecord: 2.9ms | Allocations: 7691)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:06.801417' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 9ms (ActiveRecord: 1.5ms | Allocations: 6710)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.7ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (43.0ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:06.865311' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:16:06.880166' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 12ms (ActiveRecord: 3.1ms | Allocations: 5704)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:06.887651' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 1630)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:16:06.898809' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:16:06.911299' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 09:16:06.918067' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 15ms (ActiveRecord: 3.0ms | Allocations: 11600) DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 126)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:16:06.975176' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: eb473ec6-c5ab-402a-86de-2c8d12bdf1ee) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.9ms | Allocations: 2047)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:16:06.981488' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: f1d89580-a7ca-4d41-98c7-df422ebc88e5) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms | Allocations: 2064)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [70894d6b-2542-4c5f-82f0-9d637d3ae451] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 70894d6b-2542-4c5f-82f0-9d637d3ae451) from Test(default) enqueued at 2020-04-14T09:16:06Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [70894d6b-2542-4c5f-82f0-9d637d3ae451] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 70894d6b-2542-4c5f-82f0-9d637d3ae451) from Test(default) in 4.31ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: 70894d6b-2542-4c5f-82f0-9d637d3ae451) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.4ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 09:16:07.006843', '2020-04-14 09:16:07.006843') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:16:07.019867' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:16:07.030765', '2020-04-14 09:16:07.030765') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:16:07.051767' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:16:07.067652' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:16:07.081588' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:16:07.097645' WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [34e2ccba-e1a2-44d1-b822-0a8c40911dae] Performing DiscoApp::SendSubscriptionJob (Job ID: 34e2ccba-e1a2-44d1-b822-0a8c40911dae) from Test(default) enqueued at 2020-04-14T09:16:07Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [34e2ccba-e1a2-44d1-b822-0a8c40911dae] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [34e2ccba-e1a2-44d1-b822-0a8c40911dae] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [34e2ccba-e1a2-44d1-b822-0a8c40911dae] Performed DiscoApp::SendSubscriptionJob (Job ID: 34e2ccba-e1a2-44d1-b822-0a8c40911dae) from Test(default) in 15.36ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 34e2ccba-e1a2-44d1-b822-0a8c40911dae) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.2ms) BEGIN  (1.7ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.6ms) COMMIT  (0.3ms) BEGIN Fixtures Load (2.6ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 09:18:39.001366', '2020-04-14 09:18:39.001366'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 09:18:39.006591', '2020-04-14 09:18:39.006591', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 09:18:39.006591', '2020-04-14 09:18:39.006591', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 09:18:39.012438', '2020-04-14 09:18:39.012438', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 09:18:39.012438', '2020-04-14 09:18:39.012438', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 09:18:39.015090', '2020-04-14 09:18:39.015090', DEFAULT, DEFAULT, '2020-04-07 09:18:38', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 09:18:39.015090', '2020-04-14 09:18:39.015090', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 09:18:39.018843', '2020-04-14 09:18:39.018843'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 09:18:39.021261', '2020-04-14 09:18:39.021261', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 09:18:39.025020', '2020-04-14 09:18:39.025020', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 09:18:39.025020', '2020-04-14 09:18:39.025020', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 09:18:39.025020', '2020-04-14 09:18:39.025020', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 09:18:39.025020', '2020-04-14 09:18:39.025020', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 09:18:39.025020', '2020-04-14 09:18:39.025020', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 09:18:39.025020', '2020-04-14 09:18:39.025020', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 09:18:39.033848', '2020-04-14 09:18:39.033848'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.3ms) COMMIT  (0.1ms) BEGIN  (1.1ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [3cf6753f-eee6-4f5c-ae2e-e46416f69abc] Performing DiscoApp::SendSubscriptionJob (Job ID: 3cf6753f-eee6-4f5c-ae2e-e46416f69abc) from Test(default) enqueued at 2020-04-14T09:18:39Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [3cf6753f-eee6-4f5c-ae2e-e46416f69abc] DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [3cf6753f-eee6-4f5c-ae2e-e46416f69abc] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [3cf6753f-eee6-4f5c-ae2e-e46416f69abc] Performed DiscoApp::SendSubscriptionJob (Job ID: 3cf6753f-eee6-4f5c-ae2e-e46416f69abc) from Test(default) in 244.47ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 3cf6753f-eee6-4f5c-ae2e-e46416f69abc) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 5) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms | Allocations: 1432)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 103)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.6ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:39.521393' WHERE "disco_app_shops"."id" = 605094243  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.4ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 17ms (ActiveRecord: 4.3ms | Allocations: 3349)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:39.551435' WHERE "disco_app_shops"."id" = 605094243  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.6ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 09:18:39.553759' WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 4ms (ActiveRecord: 1.4ms | Allocations: 912)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 1.7ms | Allocations: 338) [Webpacker] Compiling... [Webpacker] Compiled all packs in /Users/pille/Disco/disco_app/test/dummy/public/packs-test [Webpacker] warning package.json: No license field Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade` Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 1.0ms | Allocations: 104) Completed 200 OK in 4199ms (Views: 4173.3ms | ActiveRecord: 3.0ms | Allocations: 533045)  (0.4ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:18:43.773013' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.7ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 1.2ms | Allocations: 512)  (0.3ms) ROLLBACK  (0.5ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:43.804032' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 13) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 14) Completed 200 OK in 10ms (Views: 2.1ms | ActiveRecord: 2.3ms | Allocations: 4298)  (0.4ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 224)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:43.827880' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.6ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.5ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (1.0ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 4ms (ActiveRecord: 1.0ms | Allocations: 877)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.7ms | Allocations: 512)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:18:43.856645' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.1ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:18:43.863175' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 512)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:18:43.871081' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:18:43.880970' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.9ms | Allocations: 478)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:43.894868' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:18:43.896766' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 11ms (ActiveRecord: 3.7ms | Allocations: 2591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.9ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:18:43.937248', '2020-04-14 09:18:43.937248') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 5c2024a0-bc7b-4b09-ba8b-e63096d50ceb) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.6ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 13 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.3ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 13 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.5ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:18:43.950019', '2020-04-14 09:18:43.950019') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 590f989b-3929-4b37-ace3-c36c6dbd0f13) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.7ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6] Performing DiscoApp::SynchroniseUsersJob (Job ID: e4deb269-dfc5-4fa7-a107-fd9b86d0fae6) from Test(default) enqueued at 2020-04-14T09:18:43Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6] DiscoApp::User Load (0.5ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6] DiscoApp::User Create (0.4ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 09:18:44.017424', '2020-04-14 09:18:44.017424') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6] DiscoApp::User Update (0.3ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 09:18:44.019142' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6] DiscoApp::User Load (0.3ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6] DiscoApp::User Create (0.4ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 09:18:44.021896', '2020-04-14 09:18:44.021896') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6] DiscoApp::User Update (0.3ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 09:18:44.023426' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [e4deb269-dfc5-4fa7-a107-fd9b86d0fae6] Performed DiscoApp::SynchroniseUsersJob (Job ID: e4deb269-dfc5-4fa7-a107-fd9b86d0fae6) from Test(default) in 61.29ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: e4deb269-dfc5-4fa7-a107-fd9b86d0fae6) to Test(default) with arguments: #> DiscoApp::User Load (0.4ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.5ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.5ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:18:44.075833' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] Performing DiscoApp::AppInstalledJob (Job ID: 94349e43-5058-4efb-9b14-53b6147b3d4b) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:18:44.081303' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SynchroniseWebhooksJob] [ae37c804-335e-4c4a-95c4-2f2310d2d408] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: ae37c804-335e-4c4a-95c4-2f2310d2d408) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SynchroniseWebhooksJob] [ae37c804-335e-4c4a-95c4-2f2310d2d408] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: ae37c804-335e-4c4a-95c4-2f2310d2d408) from Test(default) in 25.56ms [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SynchroniseCarrierServiceJob] [715800b3-8c22-49d6-b544-9b6651593d73] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 715800b3-8c22-49d6-b544-9b6651593d73) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SynchroniseCarrierServiceJob] [715800b3-8c22-49d6-b544-9b6651593d73] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 715800b3-8c22-49d6-b544-9b6651593d73) from Test(default) in 6.51ms [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::ShopUpdateJob] [ff38bfb9-883e-4caf-b285-927a95c91264] Performing DiscoApp::ShopUpdateJob (Job ID: ff38bfb9-883e-4caf-b285-927a95c91264) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::ShopUpdateJob] [ff38bfb9-883e-4caf-b285-927a95c91264]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::ShopUpdateJob] [ff38bfb9-883e-4caf-b285-927a95c91264] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::ShopUpdateJob] [ff38bfb9-883e-4caf-b285-927a95c91264] DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::ShopUpdateJob] [ff38bfb9-883e-4caf-b285-927a95c91264]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::ShopUpdateJob] [ff38bfb9-883e-4caf-b285-927a95c91264] Performed DiscoApp::ShopUpdateJob (Job ID: ff38bfb9-883e-4caf-b285-927a95c91264) from Test(default) in 14.23ms [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Plan Load (0.5ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Subscription Update All (0.5ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:44.157875' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Source Load (0.4ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Subscription Create (0.5ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 09:18:44.196064', '2020-04-14 09:18:44.196064', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b]  (0.4ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857542 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SubscriptionChangedJob] [3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40] Performing DiscoApp::SubscriptionChangedJob (Job ID: 3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SubscriptionChangedJob] [3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SubscriptionChangedJob] [3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40] [DiscoApp::SendSubscriptionJob] [3ed8858b-fc9c-4f52-a81e-44525f2a49e8] Performing DiscoApp::SendSubscriptionJob (Job ID: 3ed8858b-fc9c-4f52-a81e-44525f2a49e8) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SubscriptionChangedJob] [3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40] [DiscoApp::SendSubscriptionJob] [3ed8858b-fc9c-4f52-a81e-44525f2a49e8] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SubscriptionChangedJob] [3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40] [DiscoApp::SendSubscriptionJob] [3ed8858b-fc9c-4f52-a81e-44525f2a49e8] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SubscriptionChangedJob] [3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40] [DiscoApp::SendSubscriptionJob] [3ed8858b-fc9c-4f52-a81e-44525f2a49e8] Performed DiscoApp::SendSubscriptionJob (Job ID: 3ed8858b-fc9c-4f52-a81e-44525f2a49e8) from Test(default) in 21.79ms [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SubscriptionChangedJob] [3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 3ed8858b-fc9c-4f52-a81e-44525f2a49e8) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] [DiscoApp::SubscriptionChangedJob] [3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40] Performed DiscoApp::SubscriptionChangedJob (Job ID: 3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40) from Test(default) in 24.19ms [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 3610c2e9-a023-4e3e-92bd-d4eb8d5b4a40) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:44.240074' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94349e43-5058-4efb-9b14-53b6147b3d4b] Performed DiscoApp::AppInstalledJob (Job ID: 94349e43-5058-4efb-9b14-53b6147b3d4b) from Test(default) in 164.59ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 94349e43-5058-4efb-9b14-53b6147b3d4b) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.4ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:18:44.270290' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] Performing DiscoApp::AppInstalledJob (Job ID: 6fc66f20-be3f-4808-bdc8-1cc03934b3f3) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:18:44.277243' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SynchroniseWebhooksJob] [966f2edd-4972-490f-bebb-0f54f76de71e] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 966f2edd-4972-490f-bebb-0f54f76de71e) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SynchroniseWebhooksJob] [966f2edd-4972-490f-bebb-0f54f76de71e] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 966f2edd-4972-490f-bebb-0f54f76de71e) from Test(default) in 45.7ms [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SynchroniseCarrierServiceJob] [34e5711b-e4e3-466c-a89c-07632c09b5e6] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 34e5711b-e4e3-466c-a89c-07632c09b5e6) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SynchroniseCarrierServiceJob] [34e5711b-e4e3-466c-a89c-07632c09b5e6] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 34e5711b-e4e3-466c-a89c-07632c09b5e6) from Test(default) in 17.19ms [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::ShopUpdateJob] [c91ddd23-7aed-4355-aac2-3bdc818263df] Performing DiscoApp::ShopUpdateJob (Job ID: c91ddd23-7aed-4355-aac2-3bdc818263df) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::ShopUpdateJob] [c91ddd23-7aed-4355-aac2-3bdc818263df]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::ShopUpdateJob] [c91ddd23-7aed-4355-aac2-3bdc818263df] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::ShopUpdateJob] [c91ddd23-7aed-4355-aac2-3bdc818263df] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::ShopUpdateJob] [c91ddd23-7aed-4355-aac2-3bdc818263df]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::ShopUpdateJob] [c91ddd23-7aed-4355-aac2-3bdc818263df] Performed DiscoApp::ShopUpdateJob (Job ID: c91ddd23-7aed-4355-aac2-3bdc818263df) from Test(default) in 16.51ms [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:44.363858' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:18:44.365554', '2020-04-14 09:18:44.365554') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857543 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SubscriptionChangedJob] [06eece69-a19f-46ca-8ab3-dc1d7e838fdb] Performing DiscoApp::SubscriptionChangedJob (Job ID: 06eece69-a19f-46ca-8ab3-dc1d7e838fdb) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SubscriptionChangedJob] [06eece69-a19f-46ca-8ab3-dc1d7e838fdb] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SubscriptionChangedJob] [06eece69-a19f-46ca-8ab3-dc1d7e838fdb] [DiscoApp::SendSubscriptionJob] [42200b12-21aa-4822-b40a-c45e154c5067] Performing DiscoApp::SendSubscriptionJob (Job ID: 42200b12-21aa-4822-b40a-c45e154c5067) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SubscriptionChangedJob] [06eece69-a19f-46ca-8ab3-dc1d7e838fdb] [DiscoApp::SendSubscriptionJob] [42200b12-21aa-4822-b40a-c45e154c5067] DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SubscriptionChangedJob] [06eece69-a19f-46ca-8ab3-dc1d7e838fdb] [DiscoApp::SendSubscriptionJob] [42200b12-21aa-4822-b40a-c45e154c5067] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SubscriptionChangedJob] [06eece69-a19f-46ca-8ab3-dc1d7e838fdb] [DiscoApp::SendSubscriptionJob] [42200b12-21aa-4822-b40a-c45e154c5067] Performed DiscoApp::SendSubscriptionJob (Job ID: 42200b12-21aa-4822-b40a-c45e154c5067) from Test(default) in 25.17ms [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SubscriptionChangedJob] [06eece69-a19f-46ca-8ab3-dc1d7e838fdb] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 42200b12-21aa-4822-b40a-c45e154c5067) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] [DiscoApp::SubscriptionChangedJob] [06eece69-a19f-46ca-8ab3-dc1d7e838fdb] Performed DiscoApp::SubscriptionChangedJob (Job ID: 06eece69-a19f-46ca-8ab3-dc1d7e838fdb) from Test(default) in 27.06ms [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 06eece69-a19f-46ca-8ab3-dc1d7e838fdb) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:44.399788' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [6fc66f20-be3f-4808-bdc8-1cc03934b3f3] Performed DiscoApp::AppInstalledJob (Job ID: 6fc66f20-be3f-4808-bdc8-1cc03934b3f3) from Test(default) in 126.33ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 6fc66f20-be3f-4808-bdc8-1cc03934b3f3) to Test(default) with arguments: #> DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.5ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:18:44.411196' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] Performing DiscoApp::AppInstalledJob (Job ID: ade14b5e-4257-4c39-92bd-78ab7e833d1c) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:18:44.414633' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SynchroniseWebhooksJob] [ad98f03a-7534-4fd9-9de4-4ad66bcd9956] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: ad98f03a-7534-4fd9-9de4-4ad66bcd9956) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SynchroniseWebhooksJob] [ad98f03a-7534-4fd9-9de4-4ad66bcd9956] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: ad98f03a-7534-4fd9-9de4-4ad66bcd9956) from Test(default) in 25.8ms [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SynchroniseCarrierServiceJob] [764bf67a-7ae8-41fb-aa6a-a8aa1344bd97] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 764bf67a-7ae8-41fb-aa6a-a8aa1344bd97) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SynchroniseCarrierServiceJob] [764bf67a-7ae8-41fb-aa6a-a8aa1344bd97] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 764bf67a-7ae8-41fb-aa6a-a8aa1344bd97) from Test(default) in 5.31ms [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::ShopUpdateJob] [c8e844b9-125c-473d-a14b-02f358a1633e] Performing DiscoApp::ShopUpdateJob (Job ID: c8e844b9-125c-473d-a14b-02f358a1633e) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::ShopUpdateJob] [c8e844b9-125c-473d-a14b-02f358a1633e]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::ShopUpdateJob] [c8e844b9-125c-473d-a14b-02f358a1633e] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::ShopUpdateJob] [c8e844b9-125c-473d-a14b-02f358a1633e] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::ShopUpdateJob] [c8e844b9-125c-473d-a14b-02f358a1633e]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::ShopUpdateJob] [c8e844b9-125c-473d-a14b-02f358a1633e] Performed DiscoApp::ShopUpdateJob (Job ID: c8e844b9-125c-473d-a14b-02f358a1633e) from Test(default) in 6.1ms [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:44.455772' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:18:44.456929', '2020-04-14 09:18:44.456929') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857544 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SubscriptionChangedJob] [0b7c6bc7-63ec-4367-a9c7-8b232be63700] Performing DiscoApp::SubscriptionChangedJob (Job ID: 0b7c6bc7-63ec-4367-a9c7-8b232be63700) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SubscriptionChangedJob] [0b7c6bc7-63ec-4367-a9c7-8b232be63700] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SubscriptionChangedJob] [0b7c6bc7-63ec-4367-a9c7-8b232be63700] [DiscoApp::SendSubscriptionJob] [c0e36252-d70a-4668-9533-86d24acc6c74] Performing DiscoApp::SendSubscriptionJob (Job ID: c0e36252-d70a-4668-9533-86d24acc6c74) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SubscriptionChangedJob] [0b7c6bc7-63ec-4367-a9c7-8b232be63700] [DiscoApp::SendSubscriptionJob] [c0e36252-d70a-4668-9533-86d24acc6c74] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SubscriptionChangedJob] [0b7c6bc7-63ec-4367-a9c7-8b232be63700] [DiscoApp::SendSubscriptionJob] [c0e36252-d70a-4668-9533-86d24acc6c74] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SubscriptionChangedJob] [0b7c6bc7-63ec-4367-a9c7-8b232be63700] [DiscoApp::SendSubscriptionJob] [c0e36252-d70a-4668-9533-86d24acc6c74] Performed DiscoApp::SendSubscriptionJob (Job ID: c0e36252-d70a-4668-9533-86d24acc6c74) from Test(default) in 18.92ms [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SubscriptionChangedJob] [0b7c6bc7-63ec-4367-a9c7-8b232be63700] Enqueued DiscoApp::SendSubscriptionJob (Job ID: c0e36252-d70a-4668-9533-86d24acc6c74) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] [DiscoApp::SubscriptionChangedJob] [0b7c6bc7-63ec-4367-a9c7-8b232be63700] Performed DiscoApp::SubscriptionChangedJob (Job ID: 0b7c6bc7-63ec-4367-a9c7-8b232be63700) from Test(default) in 20.62ms [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 0b7c6bc7-63ec-4367-a9c7-8b232be63700) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:44.483728' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ade14b5e-4257-4c39-92bd-78ab7e833d1c] Performed DiscoApp::AppInstalledJob (Job ID: ade14b5e-4257-4c39-92bd-78ab7e833d1c) from Test(default) in 73.06ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: ade14b5e-4257-4c39-92bd-78ab7e833d1c) to Test(default) with arguments: #> DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:44.499349' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.7ms | Allocations: 783)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:18:44.531055' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 479)  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:18:44.541775' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.6ms | Allocations: 90) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 15) Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.7ms | Allocations: 3043)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:18:44.556212' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 438fb03b-3708-4a0b-b080-4d54a437c96f) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 1878) DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:44.562456' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:18:44.567341' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: b743231b-1e57-446c-b0c6-dbb21bfd2981) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.6ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 342)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 09:18:44.604429' WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 09:18:44.608528' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [413edd5c-839f-4e81-b9ed-6782994b34b0] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 413edd5c-839f-4e81-b9ed-6782994b34b0) from Test(default) enqueued at 2020-04-14T09:18:44Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [413edd5c-839f-4e81-b9ed-6782994b34b0] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 413edd5c-839f-4e81-b9ed-6782994b34b0) from Test(default) in 4.0ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: 413edd5c-839f-4e81-b9ed-6782994b34b0) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.5ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:18:44.643806', '2020-04-14 09:18:44.643806') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 39b6cf64-55f6-4e47-a359-1d53b1b55fbb) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.5ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 13 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 13 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:18:44.652300', '2020-04-14 09:18:44.652300') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: cd73c231-89c6-4919-8943-75fc9eaec993) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:18:44.657723', '2020-04-14 09:18:44.657723') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 15  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:18:44.664403', '2020-04-14 09:18:44.664403') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 16  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:18:44.670100', '2020-04-14 09:18:44.670100') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 17  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:18:44.674658', '2020-04-14 09:18:44.674658') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 18  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.4ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 18  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 1.2ms | Allocations: 111) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 1.0ms | Allocations: 150)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: cb3dad7c-556d-4a92-8c97-349ec2ab6162) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.6ms | Allocations: 114)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.5ms | Allocations: 115)  (0.6ms) ROLLBACK  (0.4ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 1fe91c4d-0068-4aa7-923e-9cc3f893395b) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 2902e026-3944-4549-ac94-8292ce5782d7) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.6ms | Allocations: 92)  (0.4ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.5ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 23cc45cd-4425-4ae1-819d-574d434fd555) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 258bc3c1-8e97-4188-9d3a-387dfe0e3b54) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 595327b2-b24d-4d0b-8657-09d97489e0a5) to Test(default) with arguments: #>, #>, "widget_assets"  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.7ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.3ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.4ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: f54f2d15-8d31-4f6e-803f-b8304f1004fd) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:18:45.620263' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] Performing DiscoApp::AppUninstalledJob (Job ID: 524939cb-df3f-4bf0-9511-8bf892a84cd8) from Test(default) enqueued at 2020-04-14T09:18:45Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:18:45.623818' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] [DiscoApp::SendSubscriptionJob] [7183c47a-479f-44d4-adce-84adb1d4d453] Performing DiscoApp::SendSubscriptionJob (Job ID: 7183c47a-479f-44d4-adce-84adb1d4d453) from Test(default) enqueued at 2020-04-14T09:18:45Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] [DiscoApp::SendSubscriptionJob] [7183c47a-479f-44d4-adce-84adb1d4d453] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] [DiscoApp::SendSubscriptionJob] [7183c47a-479f-44d4-adce-84adb1d4d453] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] [DiscoApp::SendSubscriptionJob] [7183c47a-479f-44d4-adce-84adb1d4d453] Performed DiscoApp::SendSubscriptionJob (Job ID: 7183c47a-479f-44d4-adce-84adb1d4d453) from Test(default) in 22.71ms [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 7183c47a-479f-44d4-adce-84adb1d4d453) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] DiscoApp::Session Destroy (0.7ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:18:45.659062', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:18:45.661214' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [524939cb-df3f-4bf0-9511-8bf892a84cd8] Performed DiscoApp::AppUninstalledJob (Job ID: 524939cb-df3f-4bf0-9511-8bf892a84cd8) from Test(default) in 39.47ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 524939cb-df3f-4bf0-9511-8bf892a84cd8) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:18:45.666722' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] Performing DiscoApp::AppUninstalledJob (Job ID: 66d2c451-fed5-4148-8d46-5e07e77d5545) from Test(default) enqueued at 2020-04-14T09:18:45Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:18:45.671030' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] [DiscoApp::SendSubscriptionJob] [fed0527b-e415-425f-8329-664b220d7972] Performing DiscoApp::SendSubscriptionJob (Job ID: fed0527b-e415-425f-8329-664b220d7972) from Test(default) enqueued at 2020-04-14T09:18:45Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] [DiscoApp::SendSubscriptionJob] [fed0527b-e415-425f-8329-664b220d7972] DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] [DiscoApp::SendSubscriptionJob] [fed0527b-e415-425f-8329-664b220d7972] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] [DiscoApp::SendSubscriptionJob] [fed0527b-e415-425f-8329-664b220d7972] Performed DiscoApp::SendSubscriptionJob (Job ID: fed0527b-e415-425f-8329-664b220d7972) from Test(default) in 23.65ms [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] Enqueued DiscoApp::SendSubscriptionJob (Job ID: fed0527b-e415-425f-8329-664b220d7972) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] DiscoApp::Session Destroy (0.6ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:18:45.701556', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:18:45.703498' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [66d2c451-fed5-4148-8d46-5e07e77d5545] Performed DiscoApp::AppUninstalledJob (Job ID: 66d2c451-fed5-4148-8d46-5e07e77d5545) from Test(default) in 34.5ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 66d2c451-fed5-4148-8d46-5e07e77d5545) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:18:45 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [6700c211-b46c-45a2-98eb-17f200d29ea2] Performing ProductsUpdateJob (Job ID: 6700c211-b46c-45a2-98eb-17f200d29ea2) from Test(default) enqueued at 2020-04-14T09:18:45Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [6700c211-b46c-45a2-98eb-17f200d29ea2] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [6700c211-b46c-45a2-98eb-17f200d29ea2] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [6700c211-b46c-45a2-98eb-17f200d29ea2]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [6700c211-b46c-45a2-98eb-17f200d29ea2] Product Update (0.8ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:18:45.786732' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [6700c211-b46c-45a2-98eb-17f200d29ea2]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [6700c211-b46c-45a2-98eb-17f200d29ea2] Performed ProductsUpdateJob (Job ID: 6700c211-b46c-45a2-98eb-17f200d29ea2) from Test(default) in 9.05ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: 6700c211-b46c-45a2-98eb-17f200d29ea2) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 16ms (Views: 0.8ms | ActiveRecord: 2.1ms | Allocations: 8728) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.6ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Product Update (0.3ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:18:45.803461' WHERE "products"."id" = 632910393  (0.1ms) RELEASE SAVEPOINT active_record_1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:18:45 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [f017b051-621f-4233-8770-b1ecf959706b] Performing CartsUpdateJob (Job ID: f017b051-621f-4233-8770-b1ecf959706b) from Test(default) enqueued at 2020-04-14T09:18:45Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [f017b051-621f-4233-8770-b1ecf959706b] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [f017b051-621f-4233-8770-b1ecf959706b] Cart Load (0.2ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [f017b051-621f-4233-8770-b1ecf959706b]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [f017b051-621f-4233-8770-b1ecf959706b] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 09:18:45.819043' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [f017b051-621f-4233-8770-b1ecf959706b]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [f017b051-621f-4233-8770-b1ecf959706b] Performed CartsUpdateJob (Job ID: f017b051-621f-4233-8770-b1ecf959706b) from Test(default) in 8.37ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: f017b051-621f-4233-8770-b1ecf959706b) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 0.2ms | ActiveRecord: 1.4ms | Allocations: 6342) Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:18:45 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [fc0c256f-889f-4c53-bdf3-1210f13bac14] Performing ProductsCreateJob (Job ID: fc0c256f-889f-4c53-bdf3-1210f13bac14) from Test(default) enqueued at 2020-04-14T09:18:45Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [fc0c256f-889f-4c53-bdf3-1210f13bac14] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [fc0c256f-889f-4c53-bdf3-1210f13bac14] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [fc0c256f-889f-4c53-bdf3-1210f13bac14]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [fc0c256f-889f-4c53-bdf3-1210f13bac14] Product Create (0.9ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 09:18:45.837524', '2020-04-14 09:18:45.837524') RETURNING "id" [ActiveJob] [ProductsCreateJob] [fc0c256f-889f-4c53-bdf3-1210f13bac14]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [fc0c256f-889f-4c53-bdf3-1210f13bac14] Performed ProductsCreateJob (Job ID: fc0c256f-889f-4c53-bdf3-1210f13bac14) from Test(default) in 11.37ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: fc0c256f-889f-4c53-bdf3-1210f13bac14) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 17ms (Views: 0.3ms | ActiveRecord: 2.2ms | Allocations: 12383) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:18:45 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [510a35b6-6bfd-4d37-8699-053e5daf382c] Performing ProductsDeleteJob (Job ID: 510a35b6-6bfd-4d37-8699-053e5daf382c) from Test(default) enqueued at 2020-04-14T09:18:45Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [510a35b6-6bfd-4d37-8699-053e5daf382c] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [510a35b6-6bfd-4d37-8699-053e5daf382c] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [510a35b6-6bfd-4d37-8699-053e5daf382c]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [510a35b6-6bfd-4d37-8699-053e5daf382c] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [510a35b6-6bfd-4d37-8699-053e5daf382c]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [510a35b6-6bfd-4d37-8699-053e5daf382c] Performed ProductsDeleteJob (Job ID: 510a35b6-6bfd-4d37-8699-053e5daf382c) from Test(default) in 2.4ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: 510a35b6-6bfd-4d37-8699-053e5daf382c) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.1ms | Allocations: 1697)  (0.3ms) SELECT COUNT(*) FROM "products"  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:18:45.863845' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:18:45.889458' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.7ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.4ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 09:18:45.904583', '2020-04-14 09:18:45.904583') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:18:45.929840' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:18:45.952772', '2020-04-14 09:18:45.952772') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:18:45.966522' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:18:45.991954' WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.6ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 130)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:18:46.017923' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 0cae7498-ad15-45f5-840e-62d66b12761d) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.5ms | Allocations: 2068)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:18:46.032381' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 9c34969e-656a-48c6-bebe-a7df51eb9362) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 1.8ms | Allocations: 2066)  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 126)  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [b68d9fce-dad5-4024-8017-60ed6f05e34d] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: b68d9fce-dad5-4024-8017-60ed6f05e34d) from Test(default) enqueued at 2020-04-14T09:18:46Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [b68d9fce-dad5-4024-8017-60ed6f05e34d] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: b68d9fce-dad5-4024-8017-60ed6f05e34d) from Test(default) in 14.81ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: b68d9fce-dad5-4024-8017-60ed6f05e34d) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [cf6dc0f2-20c5-4e56-9aee-0c41dd767120] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: cf6dc0f2-20c5-4e56-9aee-0c41dd767120) from Test(default) enqueued at 2020-04-14T09:18:46Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [cf6dc0f2-20c5-4e56-9aee-0c41dd767120] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: cf6dc0f2-20c5-4e56-9aee-0c41dd767120) from Test(default) in 81.69ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: cf6dc0f2-20c5-4e56-9aee-0c41dd767120) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.159740' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:18:46.161529' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 608)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.169251' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.7ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 11.0ms | Allocations: 3113) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 15) Completed 200 OK in 19ms (Views: 12.8ms | ActiveRecord: 2.3ms | Allocations: 6416)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.198032' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:46.209164' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:18:46.210175', '2020-04-14 09:18:46.210175', '2020-04-14 09:18:46.209713', '2020-05-12 09:18:46.209739', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 338259de-c1f8-408d-9692-3f8b3d788084) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 8ms (ActiveRecord: 2.1ms | Allocations: 3053) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.219722' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 5.7ms | Allocations: 2854) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 12ms (Views: 6.4ms | ActiveRecord: 2.5ms | Allocations: 6824)  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.239654' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (1.0ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:46.253485' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:18:46.256077', '2020-04-14 09:18:46.256077', '2020-04-14 09:18:46.255471', '2020-06-13 09:18:46.255492', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: c0bef764-a1fe-486e-809b-ec07b96338fa) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 17ms (ActiveRecord: 5.3ms | Allocations: 4387) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.270119' WHERE "disco_app_shops"."id" = 605094243  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.7ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.5ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.7ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:46.285919' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:18:46.288136', '2020-04-14 09:18:46.288136', '2020-04-14 09:18:46.287287', '2020-05-12 09:18:46.287314', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 7375805e-8def-44fc-a861-19f20698bebb) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 19ms (ActiveRecord: 5.6ms | Allocations: 4102) DiscoApp::Subscription Load (1.9ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.8ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (1.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.7ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (1.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.6ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.6ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.309353' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 214)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.319520' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.5ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 10ms (ActiveRecord: 2.8ms | Allocations: 2415) DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 224)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.4ms | Allocations: 530)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.8ms | Allocations: 85) Completed 404 Not Found in 6ms (Views: 5.0ms | ActiveRecord: 0.3ms | Allocations: 1794)  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:18:46.374933', '2020-04-14 09:18:46.374933') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.6ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 15  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:18:46.404065', '2020-04-14 09:18:46.404065') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.5ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 16  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:18:46.422251', '2020-04-14 09:18:46.422251') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 17  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:18:46.428410', '2020-04-14 09:18:46.428410') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 18  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.5ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:46.437336' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.5ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 09:18:46.437336', '2020-04-14 09:18:46.437336') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 5a2122d8-b923-45a6-9f71-ec544c519ba2) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:46.446373' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:18:46.446373', '2020-04-14 09:18:46.446373', '2020-04-14 09:18:46.446373', '2020-06-13 09:18:46.446373', 8999, 1, 60) RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 37b11b47-0b19-4ffe-a28b-b95794c68821) to Test(default) with arguments: #>, #>  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:46.456465' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:18:46.456465', '2020-04-14 09:18:46.456465', '2020-04-14 09:18:46.456465', '2020-05-12 09:18:46.456465', 9999, 28) RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: a6884e78-6ca8-4538-ae80-253acb348a07) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:46.464763' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:18:46.464763', '2020-04-14 09:18:46.464763', '2020-04-14 09:18:46.464763', '2020-05-12 09:18:46.464763', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 2acac843-4b39-46bb-b114-89fe6ea90a06) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.7ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:46.473235' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:18:46.473235', '2020-04-14 09:18:46.473235', '2020-04-14 09:18:46.473235', '2020-05-12 09:18:46.473235', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.6ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: bfda3807-d77f-4800-9ed7-0e97e4d14db1) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:18:46.493669' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:18:46.493669', '2020-04-14 09:18:46.493669', '2020-04-14 09:18:46.493669', '2020-05-12 09:18:46.493669', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (1.0ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d2771b7d-0187-4e7b-b7ed-22f402f4d3fb) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857553 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857553 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.518195' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 4ms (ActiveRecord: 1.2ms | Allocations: 1383)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.534868' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:18:46.554008' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 13ms (ActiveRecord: 3.2ms | Allocations: 5698)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.562458' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.8ms | Allocations: 1630)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.575812' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.7ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 14ms (ActiveRecord: 3.0ms | Allocations: 5490)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.601661' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.1ms | Allocations: 430) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 7ms (Views: 2.6ms | ActiveRecord: 1.3ms | Allocations: 4291)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.618257' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.6ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:18:46.632725' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.641754' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 22ms (ActiveRecord: 4.7ms | Allocations: 10104) DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.651945' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms | Allocations: 1900)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.665752' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 215)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.673077' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.6ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.6ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:18:46.686014', '2020-04-14 09:18:46.686014') RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 09:18:46.694330', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 18ms (ActiveRecord: 4.4ms | Allocations: 6407)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:18:46.703337' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:18:46.706584' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.5ms | Allocations: 480)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.5ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:18:46.720525', '2020-04-14 09:18:46.720525', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.4ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:18:46.724635', '2020-04-14 09:18:46.724635', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.4ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:18:46.728795', '2020-04-14 09:18:46.728795', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 09:18:46.730834', '2020-04-14 09:18:46.730834') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.9ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.3ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.2ms) ROLLBACK  (0.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.3ms) BEGIN  (1.2ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.6ms) COMMIT  (0.1ms) BEGIN Fixtures Load (3.4ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 09:25:47.339736', '2020-04-14 09:25:47.339736'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 09:25:47.344187', '2020-04-14 09:25:47.344187', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 09:25:47.344187', '2020-04-14 09:25:47.344187', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 09:25:47.349063', '2020-04-14 09:25:47.349063', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 09:25:47.349063', '2020-04-14 09:25:47.349063', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 09:25:47.351477', '2020-04-14 09:25:47.351477', DEFAULT, DEFAULT, '2020-04-07 09:25:47', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 09:25:47.351477', '2020-04-14 09:25:47.351477', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 09:25:47.353927', '2020-04-14 09:25:47.353927'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 09:25:47.356073', '2020-04-14 09:25:47.356073', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 09:25:47.358396', '2020-04-14 09:25:47.358396', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 09:25:47.358396', '2020-04-14 09:25:47.358396', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 09:25:47.358396', '2020-04-14 09:25:47.358396', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 09:25:47.358396', '2020-04-14 09:25:47.358396', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 09:25:47.358396', '2020-04-14 09:25:47.358396', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 09:25:47.358396', '2020-04-14 09:25:47.358396', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 09:25:47.363515', '2020-04-14 09:25:47.363515'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.2ms) COMMIT  (0.1ms) BEGIN  (0.7ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.2ms) COMMIT  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:47.424449' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 24ms (ActiveRecord: 1.3ms | Allocations: 7236)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:47.456827' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 9ms (ActiveRecord: 1.6ms | Allocations: 3115)  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:47.474079' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.9ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:25:47.493003', '2020-04-14 09:25:47.493003') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.6ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 09:25:47.531475', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 47ms (ActiveRecord: 4.2ms | Allocations: 15356)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:47.539280' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 4ms (ActiveRecord: 1.4ms | Allocations: 1904)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:47.551706' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.0ms | Allocations: 416)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:47.560550' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 10ms (ActiveRecord: 1.8ms | Allocations: 6721)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:47.579374' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:25:47.581144' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 516)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:47.589543' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 2.4ms | Allocations: 676) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 1.0ms | Allocations: 98) Completed 200 OK in 515ms (Views: 508.4ms | ActiveRecord: 1.1ms | Allocations: 526636)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.112531' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:25:48.122954' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 8ms (ActiveRecord: 2.0ms | Allocations: 5718)  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.130248' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:25:48.141934' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.147782' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 13ms (ActiveRecord: 2.9ms | Allocations: 11602) DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 418)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:25:48.261893' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: ccedd6ac-de62-4aa7-9c54-580281b79979) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 97ms (Views: 1.2ms | ActiveRecord: 1.2ms | Allocations: 18074)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:25:48.270839' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 49280c25-9fe2-4176-b2f5-17b48fc32c57) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.2ms | Allocations: 2066)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 173)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 357)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.7ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:25:48.335001', '2020-04-14 09:25:48.335001') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: eb9a0e6f-7eae-4ef9-babb-500d619176b2) to Test(default) with arguments: #>, #>  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:25:48.341819', '2020-04-14 09:25:48.341819') RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 5080c5e6-5336-4029-ace4-c40c747a2247) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 20 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 20 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [23537cff-ccd4-4ad6-9acb-4693909e1c11] Performing DiscoApp::SendSubscriptionJob (Job ID: 23537cff-ccd4-4ad6-9acb-4693909e1c11) from Test(default) enqueued at 2020-04-14T09:25:48Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [23537cff-ccd4-4ad6-9acb-4693909e1c11] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [23537cff-ccd4-4ad6-9acb-4693909e1c11] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [23537cff-ccd4-4ad6-9acb-4693909e1c11] Performed DiscoApp::SendSubscriptionJob (Job ID: 23537cff-ccd4-4ad6-9acb-4693909e1c11) from Test(default) in 219.18ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 23537cff-ccd4-4ad6-9acb-4693909e1c11) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.586121' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:48.595086' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:25:48.603168', '2020-04-14 09:25:48.603168', '2020-04-14 09:25:48.601460', '2020-06-13 09:25:48.601481', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 230fb19c-4031-448b-9255-fda7b59f6daf) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 19ms (ActiveRecord: 3.2ms | Allocations: 11105) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.614289' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:25:48.616266' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.5ms | Allocations: 485)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.623215' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:48.630465' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:25:48.631320', '2020-04-14 09:25:48.631320', '2020-04-14 09:25:48.630933', '2020-05-12 09:25:48.630946', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: c910c5d9-a97c-4900-a74b-1aa12f2bec94) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 9ms (ActiveRecord: 2.2ms | Allocations: 4104) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.639814' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 16.0ms | Allocations: 3643) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 14) Completed 200 OK in 33ms (Views: 23.5ms | ActiveRecord: 3.5ms | Allocations: 8118)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.684127' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.0ms | Allocations: 221)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.700877' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (1.5ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.6ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 9.5ms | Allocations: 2304) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 28ms (Views: 20.1ms | ActiveRecord: 1.9ms | Allocations: 5223)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.751620' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.5ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:48.763548' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:25:48.765214', '2020-04-14 09:25:48.765214', '2020-04-14 09:25:48.764261', '2020-05-12 09:25:48.764280', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 3564fefa-1ba6-4661-ba42-9c5e7938598c) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 13ms (ActiveRecord: 2.4ms | Allocations: 3051) DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.783270' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.8ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 10ms (ActiveRecord: 2.7ms | Allocations: 2417) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779] Performing DiscoApp::SynchroniseUsersJob (Job ID: 905fa090-96fc-497e-8a31-63227241e779) from Test(default) enqueued at 2020-04-14T09:25:48Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779] DiscoApp::User Load (0.5ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779] DiscoApp::User Create (0.3ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 09:25:48.842438', '2020-04-14 09:25:48.842438') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779] DiscoApp::User Update (0.3ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 09:25:48.844057' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 09:25:48.847199', '2020-04-14 09:25:48.847199') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 09:25:48.848591' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [905fa090-96fc-497e-8a31-63227241e779] Performed DiscoApp::SynchroniseUsersJob (Job ID: 905fa090-96fc-497e-8a31-63227241e779) from Test(default) in 42.2ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: 905fa090-96fc-497e-8a31-63227241e779) to Test(default) with arguments: #> DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:25:48.908237' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] Performing DiscoApp::AppInstalledJob (Job ID: 7034a697-9a10-438e-a880-355eeb990a81) from Test(default) enqueued at 2020-04-14T09:25:48Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Shop Exists? (0.1ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:25:48.911192' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SynchroniseWebhooksJob] [42b01fa9-ffa0-4866-a133-62df4d0c6da8] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 42b01fa9-ffa0-4866-a133-62df4d0c6da8) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SynchroniseWebhooksJob] [42b01fa9-ffa0-4866-a133-62df4d0c6da8] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 42b01fa9-ffa0-4866-a133-62df4d0c6da8) from Test(default) in 14.89ms [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SynchroniseCarrierServiceJob] [9b67df82-a32b-4899-9c85-e8c1c28039e3] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 9b67df82-a32b-4899-9c85-e8c1c28039e3) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SynchroniseCarrierServiceJob] [9b67df82-a32b-4899-9c85-e8c1c28039e3] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 9b67df82-a32b-4899-9c85-e8c1c28039e3) from Test(default) in 4.2ms [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::ShopUpdateJob] [ebc9915c-82fe-4fa3-ae03-f4a66fee5d89] Performing DiscoApp::ShopUpdateJob (Job ID: ebc9915c-82fe-4fa3-ae03-f4a66fee5d89) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::ShopUpdateJob] [ebc9915c-82fe-4fa3-ae03-f4a66fee5d89]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::ShopUpdateJob] [ebc9915c-82fe-4fa3-ae03-f4a66fee5d89] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::ShopUpdateJob] [ebc9915c-82fe-4fa3-ae03-f4a66fee5d89] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::ShopUpdateJob] [ebc9915c-82fe-4fa3-ae03-f4a66fee5d89]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::ShopUpdateJob] [ebc9915c-82fe-4fa3-ae03-f4a66fee5d89] Performed DiscoApp::ShopUpdateJob (Job ID: ebc9915c-82fe-4fa3-ae03-f4a66fee5d89) from Test(default) in 5.77ms [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:48.943982' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:25:48.944891', '2020-04-14 09:25:48.944891') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857545 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SubscriptionChangedJob] [1b281543-8f61-4c33-9136-17788e6f20a4] Performing DiscoApp::SubscriptionChangedJob (Job ID: 1b281543-8f61-4c33-9136-17788e6f20a4) from Test(default) enqueued at 2020-04-14T09:25:48Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SubscriptionChangedJob] [1b281543-8f61-4c33-9136-17788e6f20a4] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SubscriptionChangedJob] [1b281543-8f61-4c33-9136-17788e6f20a4] [DiscoApp::SendSubscriptionJob] [4105f7cb-dd65-4e7e-8957-48c0b6c00cc5] Performing DiscoApp::SendSubscriptionJob (Job ID: 4105f7cb-dd65-4e7e-8957-48c0b6c00cc5) from Test(default) enqueued at 2020-04-14T09:25:48Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SubscriptionChangedJob] [1b281543-8f61-4c33-9136-17788e6f20a4] [DiscoApp::SendSubscriptionJob] [4105f7cb-dd65-4e7e-8957-48c0b6c00cc5] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SubscriptionChangedJob] [1b281543-8f61-4c33-9136-17788e6f20a4] [DiscoApp::SendSubscriptionJob] [4105f7cb-dd65-4e7e-8957-48c0b6c00cc5] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SubscriptionChangedJob] [1b281543-8f61-4c33-9136-17788e6f20a4] [DiscoApp::SendSubscriptionJob] [4105f7cb-dd65-4e7e-8957-48c0b6c00cc5] Performed DiscoApp::SendSubscriptionJob (Job ID: 4105f7cb-dd65-4e7e-8957-48c0b6c00cc5) from Test(default) in 12.89ms [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SubscriptionChangedJob] [1b281543-8f61-4c33-9136-17788e6f20a4] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 4105f7cb-dd65-4e7e-8957-48c0b6c00cc5) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] [DiscoApp::SubscriptionChangedJob] [1b281543-8f61-4c33-9136-17788e6f20a4] Performed DiscoApp::SubscriptionChangedJob (Job ID: 1b281543-8f61-4c33-9136-17788e6f20a4) from Test(default) in 14.09ms [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 1b281543-8f61-4c33-9136-17788e6f20a4) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:48.964135' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7034a697-9a10-438e-a880-355eeb990a81] Performed DiscoApp::AppInstalledJob (Job ID: 7034a697-9a10-438e-a880-355eeb990a81) from Test(default) in 55.31ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 7034a697-9a10-438e-a880-355eeb990a81) to Test(default) with arguments: #> DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:25:48.976505' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] Performing DiscoApp::AppInstalledJob (Job ID: 66422886-e5d0-4ccc-9577-372338b769eb) from Test(default) enqueued at 2020-04-14T09:25:48Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:25:48.979963' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SynchroniseWebhooksJob] [6d4b2960-0e59-4010-83a5-853d189a1d70] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 6d4b2960-0e59-4010-83a5-853d189a1d70) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SynchroniseWebhooksJob] [6d4b2960-0e59-4010-83a5-853d189a1d70] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 6d4b2960-0e59-4010-83a5-853d189a1d70) from Test(default) in 12.85ms [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SynchroniseCarrierServiceJob] [e480673c-0ab4-41e9-93ed-1235ed11bd79] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: e480673c-0ab4-41e9-93ed-1235ed11bd79) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SynchroniseCarrierServiceJob] [e480673c-0ab4-41e9-93ed-1235ed11bd79] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: e480673c-0ab4-41e9-93ed-1235ed11bd79) from Test(default) in 3.15ms [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::ShopUpdateJob] [c08c2456-4247-49ac-913e-6bfc0e42d44c] Performing DiscoApp::ShopUpdateJob (Job ID: c08c2456-4247-49ac-913e-6bfc0e42d44c) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::ShopUpdateJob] [c08c2456-4247-49ac-913e-6bfc0e42d44c]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::ShopUpdateJob] [c08c2456-4247-49ac-913e-6bfc0e42d44c] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::ShopUpdateJob] [c08c2456-4247-49ac-913e-6bfc0e42d44c] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::ShopUpdateJob] [c08c2456-4247-49ac-913e-6bfc0e42d44c]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::ShopUpdateJob] [c08c2456-4247-49ac-913e-6bfc0e42d44c] Performed DiscoApp::ShopUpdateJob (Job ID: c08c2456-4247-49ac-913e-6bfc0e42d44c) from Test(default) in 4.78ms [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:49.004510' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 09:25:49.010558', '2020-04-14 09:25:49.010558', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857546 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SubscriptionChangedJob] [c6a5b6af-68b2-4e3d-b8f2-74cca6138a17] Performing DiscoApp::SubscriptionChangedJob (Job ID: c6a5b6af-68b2-4e3d-b8f2-74cca6138a17) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SubscriptionChangedJob] [c6a5b6af-68b2-4e3d-b8f2-74cca6138a17] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SubscriptionChangedJob] [c6a5b6af-68b2-4e3d-b8f2-74cca6138a17] [DiscoApp::SendSubscriptionJob] [796550fa-cec9-41fb-8450-f365fb5295d7] Performing DiscoApp::SendSubscriptionJob (Job ID: 796550fa-cec9-41fb-8450-f365fb5295d7) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SubscriptionChangedJob] [c6a5b6af-68b2-4e3d-b8f2-74cca6138a17] [DiscoApp::SendSubscriptionJob] [796550fa-cec9-41fb-8450-f365fb5295d7] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SubscriptionChangedJob] [c6a5b6af-68b2-4e3d-b8f2-74cca6138a17] [DiscoApp::SendSubscriptionJob] [796550fa-cec9-41fb-8450-f365fb5295d7] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SubscriptionChangedJob] [c6a5b6af-68b2-4e3d-b8f2-74cca6138a17] [DiscoApp::SendSubscriptionJob] [796550fa-cec9-41fb-8450-f365fb5295d7] Performed DiscoApp::SendSubscriptionJob (Job ID: 796550fa-cec9-41fb-8450-f365fb5295d7) from Test(default) in 13.55ms [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SubscriptionChangedJob] [c6a5b6af-68b2-4e3d-b8f2-74cca6138a17] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 796550fa-cec9-41fb-8450-f365fb5295d7) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] [DiscoApp::SubscriptionChangedJob] [c6a5b6af-68b2-4e3d-b8f2-74cca6138a17] Performed DiscoApp::SubscriptionChangedJob (Job ID: c6a5b6af-68b2-4e3d-b8f2-74cca6138a17) from Test(default) in 15.08ms [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: c6a5b6af-68b2-4e3d-b8f2-74cca6138a17) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:49.031222' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [66422886-e5d0-4ccc-9577-372338b769eb] Performed DiscoApp::AppInstalledJob (Job ID: 66422886-e5d0-4ccc-9577-372338b769eb) from Test(default) in 54.25ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 66422886-e5d0-4ccc-9577-372338b769eb) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:25:49.043141' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] Performing DiscoApp::AppInstalledJob (Job ID: 9f073ec7-52c5-4e38-97fa-75e57af14fbf) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:25:49.046965' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SynchroniseWebhooksJob] [b20d4326-a408-460f-b25c-41a4cd4932c3] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: b20d4326-a408-460f-b25c-41a4cd4932c3) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SynchroniseWebhooksJob] [b20d4326-a408-460f-b25c-41a4cd4932c3] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: b20d4326-a408-460f-b25c-41a4cd4932c3) from Test(default) in 13.29ms [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SynchroniseCarrierServiceJob] [b1e41044-5f61-4ae2-a808-8dcd7f7a8e7c] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: b1e41044-5f61-4ae2-a808-8dcd7f7a8e7c) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SynchroniseCarrierServiceJob] [b1e41044-5f61-4ae2-a808-8dcd7f7a8e7c] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: b1e41044-5f61-4ae2-a808-8dcd7f7a8e7c) from Test(default) in 3.64ms [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::ShopUpdateJob] [65c889f4-733f-4796-af01-1b25cb0bc350] Performing DiscoApp::ShopUpdateJob (Job ID: 65c889f4-733f-4796-af01-1b25cb0bc350) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::ShopUpdateJob] [65c889f4-733f-4796-af01-1b25cb0bc350]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::ShopUpdateJob] [65c889f4-733f-4796-af01-1b25cb0bc350] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::ShopUpdateJob] [65c889f4-733f-4796-af01-1b25cb0bc350] DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::ShopUpdateJob] [65c889f4-733f-4796-af01-1b25cb0bc350]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::ShopUpdateJob] [65c889f4-733f-4796-af01-1b25cb0bc350] Performed DiscoApp::ShopUpdateJob (Job ID: 65c889f4-733f-4796-af01-1b25cb0bc350) from Test(default) in 5.91ms [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:49.073541' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:25:49.074484', '2020-04-14 09:25:49.074484') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857547 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SubscriptionChangedJob] [39378b08-aad1-493c-b3f8-eebc6dff2dc4] Performing DiscoApp::SubscriptionChangedJob (Job ID: 39378b08-aad1-493c-b3f8-eebc6dff2dc4) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SubscriptionChangedJob] [39378b08-aad1-493c-b3f8-eebc6dff2dc4] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SubscriptionChangedJob] [39378b08-aad1-493c-b3f8-eebc6dff2dc4] [DiscoApp::SendSubscriptionJob] [edcaf205-cde2-4a6f-866a-da390956f48e] Performing DiscoApp::SendSubscriptionJob (Job ID: edcaf205-cde2-4a6f-866a-da390956f48e) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SubscriptionChangedJob] [39378b08-aad1-493c-b3f8-eebc6dff2dc4] [DiscoApp::SendSubscriptionJob] [edcaf205-cde2-4a6f-866a-da390956f48e] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SubscriptionChangedJob] [39378b08-aad1-493c-b3f8-eebc6dff2dc4] [DiscoApp::SendSubscriptionJob] [edcaf205-cde2-4a6f-866a-da390956f48e] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SubscriptionChangedJob] [39378b08-aad1-493c-b3f8-eebc6dff2dc4] [DiscoApp::SendSubscriptionJob] [edcaf205-cde2-4a6f-866a-da390956f48e] Performed DiscoApp::SendSubscriptionJob (Job ID: edcaf205-cde2-4a6f-866a-da390956f48e) from Test(default) in 14.56ms [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SubscriptionChangedJob] [39378b08-aad1-493c-b3f8-eebc6dff2dc4] Enqueued DiscoApp::SendSubscriptionJob (Job ID: edcaf205-cde2-4a6f-866a-da390956f48e) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] [DiscoApp::SubscriptionChangedJob] [39378b08-aad1-493c-b3f8-eebc6dff2dc4] Performed DiscoApp::SubscriptionChangedJob (Job ID: 39378b08-aad1-493c-b3f8-eebc6dff2dc4) from Test(default) in 15.93ms [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 39378b08-aad1-493c-b3f8-eebc6dff2dc4) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:49.095296' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9f073ec7-52c5-4e38-97fa-75e57af14fbf] Performed DiscoApp::AppInstalledJob (Job ID: 9f073ec7-52c5-4e38-97fa-75e57af14fbf) from Test(default) in 51.05ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 9f073ec7-52c5-4e38-97fa-75e57af14fbf) to Test(default) with arguments: #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (1.0ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:25:49.113569', '2020-04-14 09:25:49.113569') RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 4b73e824-b155-42f1-a6a9-0f37e59c8d37) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:25:49.120036', '2020-04-14 09:25:49.120036') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 42cdeab8-edee-482a-8ab4-83223d08b2cc) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.4ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 20 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 20 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:25:49 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [88ca76b7-66dc-43c1-869a-3a64630d799d] Performing ProductsCreateJob (Job ID: 88ca76b7-66dc-43c1-869a-3a64630d799d) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [88ca76b7-66dc-43c1-869a-3a64630d799d] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [88ca76b7-66dc-43c1-869a-3a64630d799d] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [88ca76b7-66dc-43c1-869a-3a64630d799d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [88ca76b7-66dc-43c1-869a-3a64630d799d] Product Create (0.5ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 09:25:49.171810', '2020-04-14 09:25:49.171810') RETURNING "id" [ActiveJob] [ProductsCreateJob] [88ca76b7-66dc-43c1-869a-3a64630d799d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [88ca76b7-66dc-43c1-869a-3a64630d799d] Performed ProductsCreateJob (Job ID: 88ca76b7-66dc-43c1-869a-3a64630d799d) from Test(default) in 6.79ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 88ca76b7-66dc-43c1-869a-3a64630d799d) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.4ms | Allocations: 12459) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:25:49 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [22b37352-5fd1-4095-a015-dce90ab765f6] Performing CartsUpdateJob (Job ID: 22b37352-5fd1-4095-a015-dce90ab765f6) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [22b37352-5fd1-4095-a015-dce90ab765f6] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [22b37352-5fd1-4095-a015-dce90ab765f6] Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [22b37352-5fd1-4095-a015-dce90ab765f6]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [22b37352-5fd1-4095-a015-dce90ab765f6] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 09:25:49.190964' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [22b37352-5fd1-4095-a015-dce90ab765f6]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [22b37352-5fd1-4095-a015-dce90ab765f6] Performed CartsUpdateJob (Job ID: 22b37352-5fd1-4095-a015-dce90ab765f6) from Test(default) in 6.11ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: 22b37352-5fd1-4095-a015-dce90ab765f6) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.2ms | ActiveRecord: 1.1ms | Allocations: 6342) Cart Load (0.2ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:25:49 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [38eeeaab-83bc-49ad-b8be-1af16900246e] Performing ProductsDeleteJob (Job ID: 38eeeaab-83bc-49ad-b8be-1af16900246e) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [38eeeaab-83bc-49ad-b8be-1af16900246e] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [38eeeaab-83bc-49ad-b8be-1af16900246e] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [38eeeaab-83bc-49ad-b8be-1af16900246e]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [38eeeaab-83bc-49ad-b8be-1af16900246e] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [38eeeaab-83bc-49ad-b8be-1af16900246e]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [38eeeaab-83bc-49ad-b8be-1af16900246e] Performed ProductsDeleteJob (Job ID: 38eeeaab-83bc-49ad-b8be-1af16900246e) from Test(default) in 2.29ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: 38eeeaab-83bc-49ad-b8be-1af16900246e) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.1ms | Allocations: 1697)  (0.2ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Product Update (0.3ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:25:49.209049' WHERE "products"."id" = 632910393  (0.1ms) RELEASE SAVEPOINT active_record_1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:25:49 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [e35c9456-fcba-406f-8188-d27ce1bb3669] Performing ProductsUpdateJob (Job ID: e35c9456-fcba-406f-8188-d27ce1bb3669) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [e35c9456-fcba-406f-8188-d27ce1bb3669] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [e35c9456-fcba-406f-8188-d27ce1bb3669] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [e35c9456-fcba-406f-8188-d27ce1bb3669]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [e35c9456-fcba-406f-8188-d27ce1bb3669] Product Update (0.7ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:25:49.221437' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [e35c9456-fcba-406f-8188-d27ce1bb3669]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [e35c9456-fcba-406f-8188-d27ce1bb3669] Performed ProductsUpdateJob (Job ID: e35c9456-fcba-406f-8188-d27ce1bb3669) from Test(default) in 5.18ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: e35c9456-fcba-406f-8188-d27ce1bb3669) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.7ms | Allocations: 8449) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.4ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:25:49.248692', '2020-04-14 09:25:49.248692') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 21  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:25:49.256045', '2020-04-14 09:25:49.256045') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 22  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:25:49.260839', '2020-04-14 09:25:49.260839') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 23  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:25:49.265601', '2020-04-14 09:25:49.265601') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 24  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 24  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [5c34c1ce-fc63-477a-b50d-b0990ee97ff1] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 5c34c1ce-fc63-477a-b50d-b0990ee97ff1) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [5c34c1ce-fc63-477a-b50d-b0990ee97ff1] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 5c34c1ce-fc63-477a-b50d-b0990ee97ff1) from Test(default) in 19.44ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 5c34c1ce-fc63-477a-b50d-b0990ee97ff1) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [9ec94253-96a8-422e-943e-39b38befda4c] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 9ec94253-96a8-422e-943e-39b38befda4c) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [9ec94253-96a8-422e-943e-39b38befda4c] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 9ec94253-96a8-422e-943e-39b38befda4c) from Test(default) in 13.01ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 9ec94253-96a8-422e-943e-39b38befda4c) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.5ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:25:49.328054', '2020-04-14 09:25:49.328054', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 09:25:49.329860', '2020-04-14 09:25:49.329860') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:25:49.335296', '2020-04-14 09:25:49.335296', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:25:49.338433', '2020-04-14 09:25:49.338433', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:25:49.350318' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.5ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 09:25:49.367952', '2020-04-14 09:25:49.367952') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:25:49.381493', '2020-04-14 09:25:49.381493') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:25:49.412461' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:25:49.421334' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:25:49.437059' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:25:49.453828' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [608bffb6-66ec-4d27-8010-193dce446322] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 608bffb6-66ec-4d27-8010-193dce446322) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [608bffb6-66ec-4d27-8010-193dce446322] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 608bffb6-66ec-4d27-8010-193dce446322) from Test(default) in 4.21ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: 608bffb6-66ec-4d27-8010-193dce446322) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:49.515463' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 745)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:25:49.526464' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 8970c29b-8655-430b-bc6c-14c92f87721a) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 1878) DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:49.533324' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:25:49.538135' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: da2281c4-59df-4ffd-a90c-139ee5df2774) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.3ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 376)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:25:49.544877' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.6ms | Allocations: 88) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 14) Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.4ms | Allocations: 3074)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:25:49.554078' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.4ms | Allocations: 85) Completed 404 Not Found in 4ms (Views: 3.1ms | ActiveRecord: 0.3ms | Allocations: 2017)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 166)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms | Allocations: 376)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:25:49.585755', '2020-04-14 09:25:49.585755') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 21  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:25:49.592126', '2020-04-14 09:25:49.592126') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 22  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:25:49.610460', '2020-04-14 09:25:49.610460') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 23  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:25:49.628493', '2020-04-14 09:25:49.628493') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 24  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 09:25:49.635472' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 09:25:49.638138' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:49.643194' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:25:49.643194', '2020-04-14 09:25:49.643194', '2020-04-14 09:25:49.643194', '2020-05-12 09:25:49.643194', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 935bd378-2cad-4030-a9b8-fe739d358a53) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:49.652916' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:25:49.652916', '2020-04-14 09:25:49.652916', '2020-04-14 09:25:49.652916', '2020-05-12 09:25:49.652916', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 364e45ea-ac24-4817-a826-70441b5ea486) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:49.663355' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:25:49.663355', '2020-04-14 09:25:49.663355', '2020-04-14 09:25:49.663355', '2020-05-12 09:25:49.663355', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 71d042c1-5169-46cb-b4cc-e56178302cfc) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:49.669510' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:25:49.669510', '2020-04-14 09:25:49.669510', '2020-04-14 09:25:49.669510', '2020-06-13 09:25:49.669510', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: a722fa38-595b-498c-89ff-00f5c528dcb6) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:49.676404' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.1ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 09:25:49.676404', '2020-04-14 09:25:49.676404') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 970cfc1a-f82c-4b9b-af85-5820d7b59959) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:25:49.681552' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:25:49.681552', '2020-04-14 09:25:49.681552', '2020-04-14 09:25:49.681552', '2020-05-12 09:25:49.681552', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 2179825f-979e-4e47-a73c-5dacc0d64c91) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857553 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857553 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:25:49.699334' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 617)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:49.707208' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 09:25:49.708271' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 912)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 218)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:25:49.720759' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.5ms | Allocations: 114) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 20) Completed 200 OK in 8ms (Views: 2.3ms | ActiveRecord: 1.6ms | Allocations: 5038)  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:25:49.740361' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:49.747612' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 1.0ms | Allocations: 877)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:25:49.761121' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:49.772740' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.7ms | Allocations: 2625)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:49.787031' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.0ms | Allocations: 13) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 8ms (Views: 1.5ms | ActiveRecord: 1.9ms | Allocations: 4297)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:25:49.799689' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.1ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:25:49.800597' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 2591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:25:49.810231' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:25:49.818846' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] Performing DiscoApp::AppUninstalledJob (Job ID: 587c18cf-c122-492d-bf88-5e8e9e5c05a3) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:25:49.822223' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] [DiscoApp::SendSubscriptionJob] [0375a9df-1ce9-474f-b6c1-f3674fd4b407] Performing DiscoApp::SendSubscriptionJob (Job ID: 0375a9df-1ce9-474f-b6c1-f3674fd4b407) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] [DiscoApp::SendSubscriptionJob] [0375a9df-1ce9-474f-b6c1-f3674fd4b407] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] [DiscoApp::SendSubscriptionJob] [0375a9df-1ce9-474f-b6c1-f3674fd4b407] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] [DiscoApp::SendSubscriptionJob] [0375a9df-1ce9-474f-b6c1-f3674fd4b407] Performed DiscoApp::SendSubscriptionJob (Job ID: 0375a9df-1ce9-474f-b6c1-f3674fd4b407) from Test(default) in 12.84ms [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 0375a9df-1ce9-474f-b6c1-f3674fd4b407) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:25:49.840233', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:25:49.842954' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [587c18cf-c122-492d-bf88-5e8e9e5c05a3] Performed DiscoApp::AppUninstalledJob (Job ID: 587c18cf-c122-492d-bf88-5e8e9e5c05a3) from Test(default) in 23.13ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 587c18cf-c122-492d-bf88-5e8e9e5c05a3) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:25:49.849089' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] Performing DiscoApp::AppUninstalledJob (Job ID: a3d966b8-7e41-44fd-9123-5d9b570b1055) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:25:49.853323' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] [DiscoApp::SendSubscriptionJob] [e9943715-01b9-40ac-8fa7-6a6a719ac7cb] Performing DiscoApp::SendSubscriptionJob (Job ID: e9943715-01b9-40ac-8fa7-6a6a719ac7cb) from Test(default) enqueued at 2020-04-14T09:25:49Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] [DiscoApp::SendSubscriptionJob] [e9943715-01b9-40ac-8fa7-6a6a719ac7cb] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] [DiscoApp::SendSubscriptionJob] [e9943715-01b9-40ac-8fa7-6a6a719ac7cb] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] [DiscoApp::SendSubscriptionJob] [e9943715-01b9-40ac-8fa7-6a6a719ac7cb] Performed DiscoApp::SendSubscriptionJob (Job ID: e9943715-01b9-40ac-8fa7-6a6a719ac7cb) from Test(default) in 12.82ms [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] Enqueued DiscoApp::SendSubscriptionJob (Job ID: e9943715-01b9-40ac-8fa7-6a6a719ac7cb) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:25:49.871246', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:25:49.873123' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [a3d966b8-7e41-44fd-9123-5d9b570b1055] Performed DiscoApp::AppUninstalledJob (Job ID: a3d966b8-7e41-44fd-9123-5d9b570b1055) from Test(default) in 22.25ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: a3d966b8-7e41-44fd-9123-5d9b570b1055) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.5ms | Allocations: 111) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.6ms | Allocations: 150)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.4ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 4b2f8e79-6944-4733-87a9-eaec9230b9d6) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 4e89303f-532f-4c78-84a4-7367c0389066) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 71d202b9-94a2-441e-aec7-c478204bd213) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.4ms | Allocations: 92)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.6ms | Allocations: 115)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: a8799b06-d81d-4d39-b6aa-c26263812856) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: a086114a-9ba0-40ce-ab8e-2f5b36278d58) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 9a012a0a-8120-48dc-8bc2-8f3060816440) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 1f336a03-5e73-4d1c-bddb-314d5ddb207c) to Test(default) with arguments: #>, #>, "widget_assets"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.4ms | Allocations: 114)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.1ms) BEGIN  (1.1ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.5ms) COMMIT  (0.3ms) BEGIN Fixtures Load (3.0ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 09:28:41.122980', '2020-04-14 09:28:41.122980'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 09:28:41.127585', '2020-04-14 09:28:41.127585', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 09:28:41.127585', '2020-04-14 09:28:41.127585', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 09:28:41.132121', '2020-04-14 09:28:41.132121', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 09:28:41.132121', '2020-04-14 09:28:41.132121', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 09:28:41.134150', '2020-04-14 09:28:41.134150', DEFAULT, DEFAULT, '2020-04-07 09:28:41', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 09:28:41.134150', '2020-04-14 09:28:41.134150', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 09:28:41.136890', '2020-04-14 09:28:41.136890'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 09:28:41.139205', '2020-04-14 09:28:41.139205', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 09:28:41.141451', '2020-04-14 09:28:41.141451', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 09:28:41.141451', '2020-04-14 09:28:41.141451', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 09:28:41.141451', '2020-04-14 09:28:41.141451', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 09:28:41.141451', '2020-04-14 09:28:41.141451', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 09:28:41.141451', '2020-04-14 09:28:41.141451', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 09:28:41.141451', '2020-04-14 09:28:41.141451', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 09:28:41.146262', '2020-04-14 09:28:41.146262'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.5ms) COMMIT  (0.1ms) BEGIN  (0.8ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.4ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.8ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:28:41.320051', '2020-04-14 09:28:41.320051', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:28:41.339528', '2020-04-14 09:28:41.339528', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:28:41.342087', '2020-04-14 09:28:41.342087', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 09:28:41.343197', '2020-04-14 09:28:41.343197') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 3ms (ActiveRecord: 0.0ms | Allocations: 1310)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 2.0ms | Allocations: 312) Completed 404 Not Found in 11ms (Views: 9.9ms | ActiveRecord: 0.4ms | Allocations: 3517)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 163)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.2ms | Allocations: 555)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 09:28:41.542463' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 09:28:41.546138' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:28:41 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33] Performing CartsUpdateJob (Job ID: ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33) from Test(default) enqueued at 2020-04-14T09:28:41Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33] Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 09:28:41.632725' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33] Performed CartsUpdateJob (Job ID: ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33) from Test(default) in 24.44ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: ef6e431f-ff7e-409d-a1e0-91c1f4cb7e33) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 28ms (Views: 0.4ms | ActiveRecord: 1.2ms | Allocations: 14272) Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:28:41 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [072e7d42-6f61-45a5-b6fd-a3f8b6d46088] Performing ProductsDeleteJob (Job ID: 072e7d42-6f61-45a5-b6fd-a3f8b6d46088) from Test(default) enqueued at 2020-04-14T09:28:41Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [072e7d42-6f61-45a5-b6fd-a3f8b6d46088] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [072e7d42-6f61-45a5-b6fd-a3f8b6d46088] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [072e7d42-6f61-45a5-b6fd-a3f8b6d46088]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [072e7d42-6f61-45a5-b6fd-a3f8b6d46088] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [072e7d42-6f61-45a5-b6fd-a3f8b6d46088]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [072e7d42-6f61-45a5-b6fd-a3f8b6d46088] Performed ProductsDeleteJob (Job ID: 072e7d42-6f61-45a5-b6fd-a3f8b6d46088) from Test(default) in 1.98ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: 072e7d42-6f61-45a5-b6fd-a3f8b6d46088) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 1.0ms | Allocations: 1713)  (0.2ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:28:41 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [f48a9428-e574-44f4-806a-7723969df33d] Performing ProductsCreateJob (Job ID: f48a9428-e574-44f4-806a-7723969df33d) from Test(default) enqueued at 2020-04-14T09:28:41Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [f48a9428-e574-44f4-806a-7723969df33d] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [f48a9428-e574-44f4-806a-7723969df33d] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [f48a9428-e574-44f4-806a-7723969df33d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [f48a9428-e574-44f4-806a-7723969df33d] Product Create (0.8ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 09:28:41.653861', '2020-04-14 09:28:41.653861') RETURNING "id" [ActiveJob] [ProductsCreateJob] [f48a9428-e574-44f4-806a-7723969df33d]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [f48a9428-e574-44f4-806a-7723969df33d] Performed ProductsCreateJob (Job ID: f48a9428-e574-44f4-806a-7723969df33d) from Test(default) in 7.04ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: f48a9428-e574-44f4-806a-7723969df33d) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.9ms | Allocations: 12433) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:28:41.667470' WHERE "products"."id" = 632910393  (0.3ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:28:41 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191] Performing ProductsUpdateJob (Job ID: ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191) from Test(default) enqueued at 2020-04-14T09:28:41Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191] Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:28:41.695345' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191] Performed ProductsUpdateJob (Job ID: ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191) from Test(default) in 4.84ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: ef5d73ee-6ac4-4e05-bc5b-2b4230f8f191) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 1.2ms | Allocations: 8454) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.5ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:28:41.715912', '2020-04-14 09:28:41.715912') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 25  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.4ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:28:41.723222', '2020-04-14 09:28:41.723222') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 26  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:28:41.728558', '2020-04-14 09:28:41.728558') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 27  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:28:41.732496', '2020-04-14 09:28:41.732496') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 28  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 28  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:41.748833' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 8ms (ActiveRecord: 1.4ms | Allocations: 2225)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:41.763922' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:41.775113' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:41.787301' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 415)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:41.795176' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:28:41.797522' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 516)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:41.804236' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:41.814928' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 4ms (ActiveRecord: 1.3ms | Allocations: 1906)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:41.828042' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 3ms (ActiveRecord: 0.8ms | Allocations: 1242)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:41.835772' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.9ms | Allocations: 455) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.7ms | Allocations: 98) Completed 200 OK in 492ms (Views: 488.3ms | ActiveRecord: 0.9ms | Allocations: 525195)  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:42.335387' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 49416675-5261-4fac-b2e4-679fd74d0817) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 1d4af9e6-766e-4742-be19-739e98e540c0) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.5ms | Allocations: 125)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.5ms) ROLLBACK  (0.5ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 058961f3-d294-40b5-a8b7-08e3e5bab6fd) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 150f631e-81ab-42e7-8ec6-5bded305aeac) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: fe822274-1bd1-4889-b8c8-3e36407bee5e) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.1ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 6755eee5-b7ee-45b5-81ae-529519eee7e6) to Test(default) with arguments: #>, #>, "widget_assets"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.1ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 70c04fc6-c33c-4a9c-8e6a-c9c539386817) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 126)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.6ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:28:43.206409' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 6a542efe-dd86-4d8c-9bea-ed9586b8dbf5) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 1.7ms | Allocations: 2563)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:28:43.217088' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 4ba3a45b-9e14-47f2-87b7-944fbb5580ff) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms | Allocations: 2067)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.5ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:28:43.248134', '2020-04-14 09:28:43.248134') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.5ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 25  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:28:43.541963', '2020-04-14 09:28:43.541963') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 26  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:28:43.546934', '2020-04-14 09:28:43.546934') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 27  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:28:43.550901', '2020-04-14 09:28:43.550901') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 28  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:28:43.578479' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.6ms | Allocations: 90) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.4ms | Allocations: 3411)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.589170' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:28:43.594065' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 4f3b3dd6-4dc8-4d46-9ace-c5bc04875fb7) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 1903) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 377)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:28:43.602241' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 79c5cf94-da45-456c-92d0-cc26fb182f3b) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.0ms | Allocations: 1878) DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.607039' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 661)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:28:43.613122' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [d6681e7e-dc01-4111-9a9d-3ac440aa4acc] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: d6681e7e-dc01-4111-9a9d-3ac440aa4acc) from Test(default) enqueued at 2020-04-14T09:28:43Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [d6681e7e-dc01-4111-9a9d-3ac440aa4acc] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: d6681e7e-dc01-4111-9a9d-3ac440aa4acc) from Test(default) in 21.6ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: d6681e7e-dc01-4111-9a9d-3ac440aa4acc) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.666045' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.6ms | Allocations: 105) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 8ms (Views: 2.3ms | ActiveRecord: 1.4ms | Allocations: 4850)  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.0ms | Allocations: 22) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 20) Completed 200 OK in 9ms (Views: 1.4ms | ActiveRecord: 1.9ms | Allocations: 5766)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:28:43.693621' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 480)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:28:43.705909' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.713044' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 09:28:43.714227' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 912)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.721807' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.1ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:28:43.722810' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 7ms (ActiveRecord: 2.0ms | Allocations: 2626)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:28:43.734890' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:28:43.741422' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.748713' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 877)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:28:43.760003' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.766931' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 1.5ms | Allocations: 2591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 224)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.5ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:28:43.781169' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.7ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:28:43.781169', '2020-04-14 09:28:43.781169', '2020-04-14 09:28:43.781169', '2020-05-12 09:28:43.781169', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 218f4c88-2cef-4891-b3c4-d05882e3569f) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857542 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857542 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:28:43.802212' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:28:43.802212', '2020-04-14 09:28:43.802212', '2020-04-14 09:28:43.802212', '2020-06-13 09:28:43.802212', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 305da352-7bcc-4cdb-85d9-9c0dac11d851) to Test(default) with arguments: #>, #>  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:28:43.815858' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:28:43.815858', '2020-04-14 09:28:43.815858', '2020-04-14 09:28:43.815858', '2020-05-12 09:28:43.815858', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 085079fb-bf67-4edd-9652-92659ddb7d97) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:28:43.822371' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 09:28:43.822371', '2020-04-14 09:28:43.822371') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 945228ce-f2fd-4ad4-9c1e-5d593ec31a37) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:28:43.828343' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:28:43.828343', '2020-04-14 09:28:43.828343', '2020-04-14 09:28:43.828343', '2020-05-12 09:28:43.828343', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d7405936-7148-48a2-83d1-1d45b8f5a2b5) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:28:43.839567' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:28:43.839567', '2020-04-14 09:28:43.839567', '2020-04-14 09:28:43.839567', '2020-05-12 09:28:43.839567', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: a1c945df-6c25-47c7-be7e-d715b50a8d73) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:28:43.873341', '2020-04-14 09:28:43.873341') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: f515c861-de45-4c1f-9f4c-0b1d8ccbf6ea) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 29 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 29 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:28:43.881559', '2020-04-14 09:28:43.881559') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 68a02dc6-2d02-44e2-a9d5-368c2fc35f4e) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:28:43.887331', '2020-04-14 09:28:43.887331') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 70edefd9-aeaa-4aad-bb5d-a1e2a2aa8582) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:28:43.893135', '2020-04-14 09:28:43.893135') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 07570b86-ff6a-4fc5-a19b-6b64c38eb9f6) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.4ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 30 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 30 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.929959' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 341)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.937576' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 7ms (ActiveRecord: 2.2ms | Allocations: 2448) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.951830' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:28:43.960785' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:28:43.962211', '2020-04-14 09:28:43.962211', '2020-04-14 09:28:43.961647', '2020-05-12 09:28:43.961667', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d9f64e1a-9648-4858-b94a-261abf119379) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 12ms (ActiveRecord: 3.2ms | Allocations: 4103) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.972114' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:28:43.981456' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:28:43.982445', '2020-04-14 09:28:43.982445', '2020-04-14 09:28:43.982021', '2020-05-12 09:28:43.982034', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: a494ccbb-c6a1-4ab6-ab61-ee9b32c7c5d8) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 8ms (ActiveRecord: 2.0ms | Allocations: 3051) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:43.991486' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:28:44.001259' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:28:44.003325', '2020-04-14 09:28:44.003325', '2020-04-14 09:28:44.002864', '2020-06-13 09:28:44.002881', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: eaf9f84b-4b46-4174-9a29-78d2dc8c1649) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 13ms (ActiveRecord: 3.6ms | Allocations: 4386) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:44.015986' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 6.8ms | Allocations: 3078) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 12ms (Views: 8.2ms | ActiveRecord: 1.5ms | Allocations: 6365)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:44.038602' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 5.2ms | Allocations: 2854) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 12ms (Views: 5.7ms | ActiveRecord: 2.5ms | Allocations: 6824)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:28:44.055526' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:28:44.057275' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 479)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 428)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.1ms) ROLLBACK  (0.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.1ms) BEGIN  (0.9ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.7ms) COMMIT  (0.2ms) BEGIN Fixtures Load (2.8ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 09:29:14.162653', '2020-04-14 09:29:14.162653'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 09:29:14.167005', '2020-04-14 09:29:14.167005', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 09:29:14.167005', '2020-04-14 09:29:14.167005', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 09:29:14.171955', '2020-04-14 09:29:14.171955', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 09:29:14.171955', '2020-04-14 09:29:14.171955', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 09:29:14.174527', '2020-04-14 09:29:14.174527', DEFAULT, DEFAULT, '2020-04-07 09:29:14', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 09:29:14.174527', '2020-04-14 09:29:14.174527', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 09:29:14.177135', '2020-04-14 09:29:14.177135'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 09:29:14.179291', '2020-04-14 09:29:14.179291', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 09:29:14.181499', '2020-04-14 09:29:14.181499', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 09:29:14.181499', '2020-04-14 09:29:14.181499', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 09:29:14.181499', '2020-04-14 09:29:14.181499', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 09:29:14.181499', '2020-04-14 09:29:14.181499', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 09:29:14.181499', '2020-04-14 09:29:14.181499', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 09:29:14.181499', '2020-04-14 09:29:14.181499', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 09:29:14.186724', '2020-04-14 09:29:14.186724'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.8ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:29:14.276075' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (20.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:29:14.307026' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:29:14.344725' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.4ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 09:29:14.358249', '2020-04-14 09:29:14.358249') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:29:14.379669' WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:29:14.390653', '2020-04-14 09:29:14.390653') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:29:14.403074' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:14.428105' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:14.449066' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:29:14.451109', '2020-04-14 09:29:14.451109', '2020-04-14 09:29:14.449696', '2020-05-12 09:29:14.449712', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: edc7445d-1397-49aa-9f38-993cb3db1f8e) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 85ms (ActiveRecord: 2.9ms | Allocations: 23482) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:14.532013' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 418)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:14.539842' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 14.7ms | Allocations: 10843) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 1.0ms | Allocations: 98) Completed 200 OK in 519ms (Views: 513.7ms | ActiveRecord: 1.3ms | Allocations: 536214)  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:15.070717' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 4.8ms | Allocations: 2862) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 11ms (Views: 5.2ms | ActiveRecord: 2.6ms | Allocations: 6832)  (0.4ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:15.087995' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:15.096711' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:29:15.103312', '2020-04-14 09:29:15.103312', '2020-04-14 09:29:15.102734', '2020-06-13 09:29:15.102772', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b68baae2-4d33-4004-80a1-94921edb7eba) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 17ms (ActiveRecord: 3.4ms | Allocations: 9167) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:15.114888' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:29:15.116735' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 515)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:15.123990' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 2417) DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:15.134801' WHERE "disco_app_shops"."id" = 605094243  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.2ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:15.143539' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:29:15.144545', '2020-04-14 09:29:15.144545', '2020-04-14 09:29:15.144113', '2020-05-12 09:29:15.144128', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 7afee890-b15f-417f-a62e-1dbed8cfbadc) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 7ms (ActiveRecord: 1.6ms | Allocations: 3051) DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:29:15 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [caa88432-12a9-4bbe-8722-f99be190f808] Performing ProductsUpdateJob (Job ID: caa88432-12a9-4bbe-8722-f99be190f808) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [caa88432-12a9-4bbe-8722-f99be190f808] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [caa88432-12a9-4bbe-8722-f99be190f808] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [caa88432-12a9-4bbe-8722-f99be190f808]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [caa88432-12a9-4bbe-8722-f99be190f808] Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:29:15.211570' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [caa88432-12a9-4bbe-8722-f99be190f808]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [caa88432-12a9-4bbe-8722-f99be190f808] Performed ProductsUpdateJob (Job ID: caa88432-12a9-4bbe-8722-f99be190f808) from Test(default) in 4.63ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: caa88432-12a9-4bbe-8722-f99be190f808) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 1.9ms | ActiveRecord: 1.3ms | Allocations: 8983) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:29:15 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [cff0d37c-1a87-4816-a336-fd48b08b2bd3] Performing ProductsCreateJob (Job ID: cff0d37c-1a87-4816-a336-fd48b08b2bd3) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [cff0d37c-1a87-4816-a336-fd48b08b2bd3] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [cff0d37c-1a87-4816-a336-fd48b08b2bd3] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [cff0d37c-1a87-4816-a336-fd48b08b2bd3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [cff0d37c-1a87-4816-a336-fd48b08b2bd3] Product Create (0.5ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 09:29:15.228485', '2020-04-14 09:29:15.228485') RETURNING "id" [ActiveJob] [ProductsCreateJob] [cff0d37c-1a87-4816-a336-fd48b08b2bd3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [cff0d37c-1a87-4816-a336-fd48b08b2bd3] Performed ProductsCreateJob (Job ID: cff0d37c-1a87-4816-a336-fd48b08b2bd3) from Test(default) in 23.14ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: cff0d37c-1a87-4816-a336-fd48b08b2bd3) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 28ms (Views: 0.3ms | ActiveRecord: 1.4ms | Allocations: 12867) Product Load (0.5ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:29:15.259132' WHERE "products"."id" = 632910393  (0.1ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:29:15 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [c8c02b55-c7b5-47f4-a3ad-862071e989ba] Performing CartsUpdateJob (Job ID: c8c02b55-c7b5-47f4-a3ad-862071e989ba) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [c8c02b55-c7b5-47f4-a3ad-862071e989ba] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [c8c02b55-c7b5-47f4-a3ad-862071e989ba] Cart Load (0.4ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [c8c02b55-c7b5-47f4-a3ad-862071e989ba]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [c8c02b55-c7b5-47f4-a3ad-862071e989ba] Cart Update (0.2ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 09:29:15.274293' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [c8c02b55-c7b5-47f4-a3ad-862071e989ba]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [c8c02b55-c7b5-47f4-a3ad-862071e989ba] Performed CartsUpdateJob (Job ID: c8c02b55-c7b5-47f4-a3ad-862071e989ba) from Test(default) in 6.62ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: c8c02b55-c7b5-47f4-a3ad-862071e989ba) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 1.3ms | Allocations: 6375) Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:29:15 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [7e72e0b6-86f0-4921-b33c-c042a14fa08f] Performing ProductsDeleteJob (Job ID: 7e72e0b6-86f0-4921-b33c-c042a14fa08f) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [7e72e0b6-86f0-4921-b33c-c042a14fa08f] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [7e72e0b6-86f0-4921-b33c-c042a14fa08f] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [7e72e0b6-86f0-4921-b33c-c042a14fa08f]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [7e72e0b6-86f0-4921-b33c-c042a14fa08f] Product Destroy (0.4ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [7e72e0b6-86f0-4921-b33c-c042a14fa08f]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [7e72e0b6-86f0-4921-b33c-c042a14fa08f] Performed ProductsDeleteJob (Job ID: 7e72e0b6-86f0-4921-b33c-c042a14fa08f) from Test(default) in 3.75ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: 7e72e0b6-86f0-4921-b33c-c042a14fa08f) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.7ms | Allocations: 1697)  (0.3ms) SELECT COUNT(*) FROM "products"  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:29:15.294664' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] Performing DiscoApp::AppUninstalledJob (Job ID: f2c66c34-2a46-4bb7-85cc-32c858dafe67) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:29:15.300555' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] [DiscoApp::SendSubscriptionJob] [e6b34839-5e57-4c52-a7ff-ff720f5976dc] Performing DiscoApp::SendSubscriptionJob (Job ID: e6b34839-5e57-4c52-a7ff-ff720f5976dc) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] [DiscoApp::SendSubscriptionJob] [e6b34839-5e57-4c52-a7ff-ff720f5976dc] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] [DiscoApp::SendSubscriptionJob] [e6b34839-5e57-4c52-a7ff-ff720f5976dc] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] [DiscoApp::SendSubscriptionJob] [e6b34839-5e57-4c52-a7ff-ff720f5976dc] Performed DiscoApp::SendSubscriptionJob (Job ID: e6b34839-5e57-4c52-a7ff-ff720f5976dc) from Test(default) in 164.19ms [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] Enqueued DiscoApp::SendSubscriptionJob (Job ID: e6b34839-5e57-4c52-a7ff-ff720f5976dc) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:29:15.475175', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:29:15.477665' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f2c66c34-2a46-4bb7-85cc-32c858dafe67] Performed DiscoApp::AppUninstalledJob (Job ID: f2c66c34-2a46-4bb7-85cc-32c858dafe67) from Test(default) in 179.18ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: f2c66c34-2a46-4bb7-85cc-32c858dafe67) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:29:15.482713' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] Performing DiscoApp::AppUninstalledJob (Job ID: d9746e7e-0827-4b7b-863e-02fe497fcafc) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:29:15.486760' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] [DiscoApp::SendSubscriptionJob] [6c6784ce-0203-4bac-8de9-31d65b856eb0] Performing DiscoApp::SendSubscriptionJob (Job ID: 6c6784ce-0203-4bac-8de9-31d65b856eb0) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] [DiscoApp::SendSubscriptionJob] [6c6784ce-0203-4bac-8de9-31d65b856eb0] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] [DiscoApp::SendSubscriptionJob] [6c6784ce-0203-4bac-8de9-31d65b856eb0] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] [DiscoApp::SendSubscriptionJob] [6c6784ce-0203-4bac-8de9-31d65b856eb0] Performed DiscoApp::SendSubscriptionJob (Job ID: 6c6784ce-0203-4bac-8de9-31d65b856eb0) from Test(default) in 14.92ms [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 6c6784ce-0203-4bac-8de9-31d65b856eb0) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:29:15.507021', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:29:15.508631' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d9746e7e-0827-4b7b-863e-02fe497fcafc] Performed DiscoApp::AppUninstalledJob (Job ID: d9746e7e-0827-4b7b-863e-02fe497fcafc) from Test(default) in 24.5ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: d9746e7e-0827-4b7b-863e-02fe497fcafc) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.5ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:29:15.531175', '2020-04-14 09:29:15.531175') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 3a5a1660-730f-4d7d-8f1e-03820cfa830b) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.6ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:29:15.538702', '2020-04-14 09:29:15.538702') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 7cb6dbbf-fd64-42b6-83c6-844f3e071ec6) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 32 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 32 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.4ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:29:15.554600', '2020-04-14 09:29:15.554600', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:29:15.557900', '2020-04-14 09:29:15.557900', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.4ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:29:15.561290', '2020-04-14 09:29:15.561290', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 09:29:15.562679', '2020-04-14 09:29:15.562679') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.6ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:29:15.581002', '2020-04-14 09:29:15.581002') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.6ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 31  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:29:15.588594', '2020-04-14 09:29:15.588594') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 32  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:29:15.593750', '2020-04-14 09:29:15.593750') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 33  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:29:15.598625', '2020-04-14 09:29:15.598625') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 34  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 34  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:29:15.606727', '2020-04-14 09:29:15.606727') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 33  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:29:15.629972', '2020-04-14 09:29:15.629972') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 34  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:29:15.634284', '2020-04-14 09:29:15.634284') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 35  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:29:15.638997', '2020-04-14 09:29:15.638997') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 36  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:15.664109' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 819)  (0.3ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:29:15.677478' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 071e5796-2bae-460a-a5c2-942e257d7236) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 7ms (ActiveRecord: 1.5ms | Allocations: 2388) DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:15.683742' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:29:15.687927' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 4a13a42b-af73-4199-90fe-437d1430f3b6) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.2ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 377)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:29:15.694503' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:29:15.700941' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.8ms | Allocations: 88) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 14) Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.7ms | Allocations: 3211)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [26b908af-fdc6-4bb1-93d9-aa77d48bf1b8] Performing DiscoApp::SendSubscriptionJob (Job ID: 26b908af-fdc6-4bb1-93d9-aa77d48bf1b8) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [26b908af-fdc6-4bb1-93d9-aa77d48bf1b8] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [26b908af-fdc6-4bb1-93d9-aa77d48bf1b8] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [26b908af-fdc6-4bb1-93d9-aa77d48bf1b8] Performed DiscoApp::SendSubscriptionJob (Job ID: 26b908af-fdc6-4bb1-93d9-aa77d48bf1b8) from Test(default) in 14.37ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 26b908af-fdc6-4bb1-93d9-aa77d48bf1b8) to Test(default) with arguments: #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [bff377f3-f7ce-4507-911b-10b695cfe032] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: bff377f3-f7ce-4507-911b-10b695cfe032) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [bff377f3-f7ce-4507-911b-10b695cfe032] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: bff377f3-f7ce-4507-911b-10b695cfe032) from Test(default) in 19.61ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: bff377f3-f7ce-4507-911b-10b695cfe032) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [1e4ea21e-4266-4105-bab0-79cc6f1ec7cb] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 1e4ea21e-4266-4105-bab0-79cc6f1ec7cb) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [1e4ea21e-4266-4105-bab0-79cc6f1ec7cb] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 1e4ea21e-4266-4105-bab0-79cc6f1ec7cb) from Test(default) in 55.36ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 1e4ea21e-4266-4105-bab0-79cc6f1ec7cb) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [7e9563e0-2778-43b0-9f1e-ef3c02a6bdd0] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7e9563e0-2778-43b0-9f1e-ef3c02a6bdd0) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [7e9563e0-2778-43b0-9f1e-ef3c02a6bdd0] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7e9563e0-2778-43b0-9f1e-ef3c02a6bdd0) from Test(default) in 4.94ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7e9563e0-2778-43b0-9f1e-ef3c02a6bdd0) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.4ms | Allocations: 591)  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 134)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.6ms | Allocations: 90) Completed 404 Not Found in 4ms (Views: 2.8ms | ActiveRecord: 0.3ms | Allocations: 1806)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 163)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:29:15.905605' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] Performing DiscoApp::AppInstalledJob (Job ID: 7ca84f54-bf0e-4faa-88f5-e5299cdb6c61) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Shop Exists? (0.1ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:29:15.908366' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SynchroniseWebhooksJob] [627cc481-3d07-4147-a4a8-03f30e3b20b1] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 627cc481-3d07-4147-a4a8-03f30e3b20b1) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SynchroniseWebhooksJob] [627cc481-3d07-4147-a4a8-03f30e3b20b1] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 627cc481-3d07-4147-a4a8-03f30e3b20b1) from Test(default) in 12.92ms [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SynchroniseCarrierServiceJob] [f8d1ad14-8db7-44dc-99f0-a5a7fa325712] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: f8d1ad14-8db7-44dc-99f0-a5a7fa325712) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SynchroniseCarrierServiceJob] [f8d1ad14-8db7-44dc-99f0-a5a7fa325712] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: f8d1ad14-8db7-44dc-99f0-a5a7fa325712) from Test(default) in 3.53ms [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::ShopUpdateJob] [2caa1b14-4503-455e-a485-d15a117d7cee] Performing DiscoApp::ShopUpdateJob (Job ID: 2caa1b14-4503-455e-a485-d15a117d7cee) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::ShopUpdateJob] [2caa1b14-4503-455e-a485-d15a117d7cee]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::ShopUpdateJob] [2caa1b14-4503-455e-a485-d15a117d7cee] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::ShopUpdateJob] [2caa1b14-4503-455e-a485-d15a117d7cee] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::ShopUpdateJob] [2caa1b14-4503-455e-a485-d15a117d7cee]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::ShopUpdateJob] [2caa1b14-4503-455e-a485-d15a117d7cee] Performed DiscoApp::ShopUpdateJob (Job ID: 2caa1b14-4503-455e-a485-d15a117d7cee) from Test(default) in 5.62ms [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:15.935332' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:29:15.936324', '2020-04-14 09:29:15.936324') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857545 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SubscriptionChangedJob] [a1f1bc04-3274-444b-b69a-c01abfcb080d] Performing DiscoApp::SubscriptionChangedJob (Job ID: a1f1bc04-3274-444b-b69a-c01abfcb080d) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SubscriptionChangedJob] [a1f1bc04-3274-444b-b69a-c01abfcb080d] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SubscriptionChangedJob] [a1f1bc04-3274-444b-b69a-c01abfcb080d] [DiscoApp::SendSubscriptionJob] [9b8d4081-9856-4e8e-b77c-1484b6d895e1] Performing DiscoApp::SendSubscriptionJob (Job ID: 9b8d4081-9856-4e8e-b77c-1484b6d895e1) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SubscriptionChangedJob] [a1f1bc04-3274-444b-b69a-c01abfcb080d] [DiscoApp::SendSubscriptionJob] [9b8d4081-9856-4e8e-b77c-1484b6d895e1] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SubscriptionChangedJob] [a1f1bc04-3274-444b-b69a-c01abfcb080d] [DiscoApp::SendSubscriptionJob] [9b8d4081-9856-4e8e-b77c-1484b6d895e1] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SubscriptionChangedJob] [a1f1bc04-3274-444b-b69a-c01abfcb080d] [DiscoApp::SendSubscriptionJob] [9b8d4081-9856-4e8e-b77c-1484b6d895e1] Performed DiscoApp::SendSubscriptionJob (Job ID: 9b8d4081-9856-4e8e-b77c-1484b6d895e1) from Test(default) in 13.74ms [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SubscriptionChangedJob] [a1f1bc04-3274-444b-b69a-c01abfcb080d] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 9b8d4081-9856-4e8e-b77c-1484b6d895e1) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] [DiscoApp::SubscriptionChangedJob] [a1f1bc04-3274-444b-b69a-c01abfcb080d] Performed DiscoApp::SubscriptionChangedJob (Job ID: a1f1bc04-3274-444b-b69a-c01abfcb080d) from Test(default) in 14.9ms [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: a1f1bc04-3274-444b-b69a-c01abfcb080d) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:15.956045' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [7ca84f54-bf0e-4faa-88f5-e5299cdb6c61] Performed DiscoApp::AppInstalledJob (Job ID: 7ca84f54-bf0e-4faa-88f5-e5299cdb6c61) from Test(default) in 49.96ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 7ca84f54-bf0e-4faa-88f5-e5299cdb6c61) to Test(default) with arguments: #> DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:29:15.969465' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] Performing DiscoApp::AppInstalledJob (Job ID: 0be8c981-e66a-421b-93f6-347f1637220d) from Test(default) enqueued at 2020-04-14T09:29:15Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:29:15.973358' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SynchroniseWebhooksJob] [6be233b1-ae89-4d65-a1f2-6fd31a824d69] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 6be233b1-ae89-4d65-a1f2-6fd31a824d69) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SynchroniseWebhooksJob] [6be233b1-ae89-4d65-a1f2-6fd31a824d69] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 6be233b1-ae89-4d65-a1f2-6fd31a824d69) from Test(default) in 13.61ms [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SynchroniseCarrierServiceJob] [a7f5efe9-ae64-4c8f-91a8-7af3a58d24c4] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: a7f5efe9-ae64-4c8f-91a8-7af3a58d24c4) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SynchroniseCarrierServiceJob] [a7f5efe9-ae64-4c8f-91a8-7af3a58d24c4] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: a7f5efe9-ae64-4c8f-91a8-7af3a58d24c4) from Test(default) in 3.07ms [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::ShopUpdateJob] [5cd5bac4-426c-4005-8d3e-e637b40cdf84] Performing DiscoApp::ShopUpdateJob (Job ID: 5cd5bac4-426c-4005-8d3e-e637b40cdf84) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::ShopUpdateJob] [5cd5bac4-426c-4005-8d3e-e637b40cdf84]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::ShopUpdateJob] [5cd5bac4-426c-4005-8d3e-e637b40cdf84] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::ShopUpdateJob] [5cd5bac4-426c-4005-8d3e-e637b40cdf84] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::ShopUpdateJob] [5cd5bac4-426c-4005-8d3e-e637b40cdf84]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::ShopUpdateJob] [5cd5bac4-426c-4005-8d3e-e637b40cdf84] Performed DiscoApp::ShopUpdateJob (Job ID: 5cd5bac4-426c-4005-8d3e-e637b40cdf84) from Test(default) in 5.1ms [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:15.998389' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Subscription Create (0.5ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 09:29:16.003450', '2020-04-14 09:29:16.003450', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857546 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SubscriptionChangedJob] [96aa72bd-954e-4fd3-8de0-59aeb5b2e93a] Performing DiscoApp::SubscriptionChangedJob (Job ID: 96aa72bd-954e-4fd3-8de0-59aeb5b2e93a) from Test(default) enqueued at 2020-04-14T09:29:16Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SubscriptionChangedJob] [96aa72bd-954e-4fd3-8de0-59aeb5b2e93a] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SubscriptionChangedJob] [96aa72bd-954e-4fd3-8de0-59aeb5b2e93a] [DiscoApp::SendSubscriptionJob] [39d8edd1-a6f9-4b45-b6b6-68383cb164c2] Performing DiscoApp::SendSubscriptionJob (Job ID: 39d8edd1-a6f9-4b45-b6b6-68383cb164c2) from Test(default) enqueued at 2020-04-14T09:29:16Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SubscriptionChangedJob] [96aa72bd-954e-4fd3-8de0-59aeb5b2e93a] [DiscoApp::SendSubscriptionJob] [39d8edd1-a6f9-4b45-b6b6-68383cb164c2] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SubscriptionChangedJob] [96aa72bd-954e-4fd3-8de0-59aeb5b2e93a] [DiscoApp::SendSubscriptionJob] [39d8edd1-a6f9-4b45-b6b6-68383cb164c2] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SubscriptionChangedJob] [96aa72bd-954e-4fd3-8de0-59aeb5b2e93a] [DiscoApp::SendSubscriptionJob] [39d8edd1-a6f9-4b45-b6b6-68383cb164c2] Performed DiscoApp::SendSubscriptionJob (Job ID: 39d8edd1-a6f9-4b45-b6b6-68383cb164c2) from Test(default) in 13.97ms [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SubscriptionChangedJob] [96aa72bd-954e-4fd3-8de0-59aeb5b2e93a] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 39d8edd1-a6f9-4b45-b6b6-68383cb164c2) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] [DiscoApp::SubscriptionChangedJob] [96aa72bd-954e-4fd3-8de0-59aeb5b2e93a] Performed DiscoApp::SubscriptionChangedJob (Job ID: 96aa72bd-954e-4fd3-8de0-59aeb5b2e93a) from Test(default) in 15.27ms [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 96aa72bd-954e-4fd3-8de0-59aeb5b2e93a) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.024088' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0be8c981-e66a-421b-93f6-347f1637220d] Performed DiscoApp::AppInstalledJob (Job ID: 0be8c981-e66a-421b-93f6-347f1637220d) from Test(default) in 53.46ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 0be8c981-e66a-421b-93f6-347f1637220d) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:29:16.035790' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] Performing DiscoApp::AppInstalledJob (Job ID: bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14) from Test(default) enqueued at 2020-04-14T09:29:16Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:29:16.039167' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SynchroniseWebhooksJob] [2ffc8109-cbb0-4d10-a95c-cbdb5f56daad] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 2ffc8109-cbb0-4d10-a95c-cbdb5f56daad) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SynchroniseWebhooksJob] [2ffc8109-cbb0-4d10-a95c-cbdb5f56daad] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 2ffc8109-cbb0-4d10-a95c-cbdb5f56daad) from Test(default) in 15.39ms [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SynchroniseCarrierServiceJob] [6b438f65-7e6f-4903-aadd-8578efaaaf77] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 6b438f65-7e6f-4903-aadd-8578efaaaf77) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SynchroniseCarrierServiceJob] [6b438f65-7e6f-4903-aadd-8578efaaaf77] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 6b438f65-7e6f-4903-aadd-8578efaaaf77) from Test(default) in 4.83ms [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::ShopUpdateJob] [6232d588-b1ed-4a0a-a085-315a1cfebd7b] Performing DiscoApp::ShopUpdateJob (Job ID: 6232d588-b1ed-4a0a-a085-315a1cfebd7b) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::ShopUpdateJob] [6232d588-b1ed-4a0a-a085-315a1cfebd7b]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::ShopUpdateJob] [6232d588-b1ed-4a0a-a085-315a1cfebd7b] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::ShopUpdateJob] [6232d588-b1ed-4a0a-a085-315a1cfebd7b] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::ShopUpdateJob] [6232d588-b1ed-4a0a-a085-315a1cfebd7b]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::ShopUpdateJob] [6232d588-b1ed-4a0a-a085-315a1cfebd7b] Performed DiscoApp::ShopUpdateJob (Job ID: 6232d588-b1ed-4a0a-a085-315a1cfebd7b) from Test(default) in 7.29ms [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:16.070473' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:29:16.071766', '2020-04-14 09:29:16.071766') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857547 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SubscriptionChangedJob] [f19d47a9-a4da-48f4-ae13-18c47b58e0ee] Performing DiscoApp::SubscriptionChangedJob (Job ID: f19d47a9-a4da-48f4-ae13-18c47b58e0ee) from Test(default) enqueued at 2020-04-14T09:29:16Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SubscriptionChangedJob] [f19d47a9-a4da-48f4-ae13-18c47b58e0ee] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SubscriptionChangedJob] [f19d47a9-a4da-48f4-ae13-18c47b58e0ee] [DiscoApp::SendSubscriptionJob] [72d43db9-8fc3-4d66-b4c1-c4c5eb2e7865] Performing DiscoApp::SendSubscriptionJob (Job ID: 72d43db9-8fc3-4d66-b4c1-c4c5eb2e7865) from Test(default) enqueued at 2020-04-14T09:29:16Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SubscriptionChangedJob] [f19d47a9-a4da-48f4-ae13-18c47b58e0ee] [DiscoApp::SendSubscriptionJob] [72d43db9-8fc3-4d66-b4c1-c4c5eb2e7865] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SubscriptionChangedJob] [f19d47a9-a4da-48f4-ae13-18c47b58e0ee] [DiscoApp::SendSubscriptionJob] [72d43db9-8fc3-4d66-b4c1-c4c5eb2e7865] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SubscriptionChangedJob] [f19d47a9-a4da-48f4-ae13-18c47b58e0ee] [DiscoApp::SendSubscriptionJob] [72d43db9-8fc3-4d66-b4c1-c4c5eb2e7865] Performed DiscoApp::SendSubscriptionJob (Job ID: 72d43db9-8fc3-4d66-b4c1-c4c5eb2e7865) from Test(default) in 16.83ms [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SubscriptionChangedJob] [f19d47a9-a4da-48f4-ae13-18c47b58e0ee] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 72d43db9-8fc3-4d66-b4c1-c4c5eb2e7865) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] [DiscoApp::SubscriptionChangedJob] [f19d47a9-a4da-48f4-ae13-18c47b58e0ee] Performed DiscoApp::SubscriptionChangedJob (Job ID: f19d47a9-a4da-48f4-ae13-18c47b58e0ee) from Test(default) in 18.92ms [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: f19d47a9-a4da-48f4-ae13-18c47b58e0ee) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.097624' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14] Performed DiscoApp::AppInstalledJob (Job ID: bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14) from Test(default) in 61.59ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: bbce2c6c-77c6-4a32-a2d0-e9b4ef688a14) to Test(default) with arguments: #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.113738' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 7ms (ActiveRecord: 1.9ms | Allocations: 2044)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.132057' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.6ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 11ms (ActiveRecord: 1.3ms | Allocations: 5522)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.154807' WHERE "disco_app_shops"."id" = 605094243  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 222)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.163172' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:29:16.165464' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 480)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.174257' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.4ms | Allocations: 1630)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.188699' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.8ms | Allocations: 445) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 14) Completed 200 OK in 10ms (Views: 4.7ms | ActiveRecord: 1.5ms | Allocations: 4307)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.213443' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:29:16.226037' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 10ms (ActiveRecord: 2.2ms | Allocations: 5680)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.233493' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 4ms (ActiveRecord: 1.1ms | Allocations: 1243)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.244319' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:29:16.257869' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.265142' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 19ms (ActiveRecord: 4.3ms | Allocations: 10109) DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:16.275926' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:29:16.286647', '2020-04-14 09:29:16.286647') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 09:29:16.293157', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 14ms (ActiveRecord: 2.9ms | Allocations: 6413)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 171)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 357)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 09:29:16.338482' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 09:29:16.341570' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.5ms | Allocations: 100)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 06e78c67-9431-4044-acc6-23da9e1226f5) to Test(default) with arguments: #>, #>, "widget_assets"  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 1ba3d832-cc9b-405a-9119-ad93bfd87871) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 1.0ms | Allocations: 115)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.5ms | Allocations: 117)  (0.6ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 9125a4af-50a0-4b5e-bdfe-583284209d6b) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 31eca432-e158-403c-802f-99965302f334) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 5e9c1ef2-a8e0-4579-b33a-72d7f9e7f321) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.6ms | Allocations: 110) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.6ms | Allocations: 147)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 570b3e11-af7f-44b2-b4a8-0c82d7fd853f) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 69ee2890-9f1f-493f-a4f6-4d3fb46ae530) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 128)  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:29:17.266485' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: eddd45c4-780b-41a6-8d47-69708284b585) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.0ms | Allocations: 2071)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:29:17.273581' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: a9f29b7b-fbe1-459e-a1ab-b5129a57f2b2) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.1ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.9ms | Allocations: 2068)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:29:17.287874', '2020-04-14 09:29:17.287874') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 1cc93e4d-af63-40c2-8bac-398df2ea00a9) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 35 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 35 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:29:17.295058', '2020-04-14 09:29:17.295058') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 4f0909af-aef9-49ef-b6f3-61d09a570411) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4] Performing DiscoApp::SynchroniseUsersJob (Job ID: 66aa3ede-db30-48d1-bb27-b3021703f6c4) from Test(default) enqueued at 2020-04-14T09:29:17Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4] DiscoApp::User Load (0.4ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 09:29:17.319591', '2020-04-14 09:29:17.319591') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 09:29:17.321052' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 09:29:17.322934', '2020-04-14 09:29:17.322934') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 09:29:17.324160' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [66aa3ede-db30-48d1-bb27-b3021703f6c4] Performed DiscoApp::SynchroniseUsersJob (Job ID: 66aa3ede-db30-48d1-bb27-b3021703f6c4) from Test(default) in 21.11ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: 66aa3ede-db30-48d1-bb27-b3021703f6c4) to Test(default) with arguments: #> DiscoApp::User Load (0.4ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 354)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:29:17.343059' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 481)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:17.350659' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.5ms | Allocations: 106) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 8ms (Views: 2.5ms | ActiveRecord: 1.6ms | Allocations: 4681)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:29:17.364876' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:29:17.372125' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:29:17.385419' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 22) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 20) Completed 200 OK in 7ms (Views: 1.5ms | ActiveRecord: 1.6ms | Allocations: 4654)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:17.402621' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 09:29:17.403993' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 911)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:17.412945' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 877)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:17.423442' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.6ms | Allocations: 2625)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:29:17.435183' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:29:17.441207' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:29:17.442251' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (1.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (10.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (5.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 24ms (ActiveRecord: 18.6ms | Allocations: 2591)  (0.4ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.5ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:17.472510' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:29:17.472510', '2020-04-14 09:29:17.472510', '2020-04-14 09:29:17.472510', '2020-05-12 09:29:17.472510', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: c680d2af-91f9-4fe2-b6ea-71b6dd1c8f1c) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:17.486687' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:29:17.486687', '2020-04-14 09:29:17.486687', '2020-04-14 09:29:17.486687', '2020-06-13 09:29:17.486687', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 1aee0fee-eb10-486c-8c22-cfa790a81468) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:17.495181' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 09:29:17.495181', '2020-04-14 09:29:17.495181') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 2889186f-ac9d-4842-85c1-4f7f3914ed64) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:17.500976' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:29:17.500976', '2020-04-14 09:29:17.500976', '2020-04-14 09:29:17.500976', '2020-05-12 09:29:17.500976', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: facb5c7e-8c18-4dbf-827c-7a272e1171e4) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:17.509705' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:29:17.509705', '2020-04-14 09:29:17.509705', '2020-04-14 09:29:17.509705', '2020-05-12 09:29:17.509705', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 3615756a-070c-4b28-926f-192b3a396ba0) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:29:17.518868' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:29:17.518868', '2020-04-14 09:29:17.518868', '2020-04-14 09:29:17.518868', '2020-05-12 09:29:17.518868', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 159b8ddf-aef7-49d6-9a89-32ce021c1e65) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857553 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857553 LIMIT 1  (0.2ms) ROLLBACK  (0.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.2ms) BEGIN  (1.0ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (1.6ms) COMMIT  (0.1ms) BEGIN Fixtures Load (4.0ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 09:44:10.823374', '2020-04-14 09:44:10.823374'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 09:44:10.827740', '2020-04-14 09:44:10.827740', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 09:44:10.827740', '2020-04-14 09:44:10.827740', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 09:44:10.833040', '2020-04-14 09:44:10.833040', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 09:44:10.833040', '2020-04-14 09:44:10.833040', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 09:44:10.835402', '2020-04-14 09:44:10.835402', DEFAULT, DEFAULT, '2020-04-07 09:44:10', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 09:44:10.835402', '2020-04-14 09:44:10.835402', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 09:44:10.838129', '2020-04-14 09:44:10.838129'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 09:44:10.840360', '2020-04-14 09:44:10.840360', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 09:44:10.842760', '2020-04-14 09:44:10.842760', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 09:44:10.842760', '2020-04-14 09:44:10.842760', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 09:44:10.842760', '2020-04-14 09:44:10.842760', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 09:44:10.842760', '2020-04-14 09:44:10.842760', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 09:44:10.842760', '2020-04-14 09:44:10.842760', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 09:44:10.842760', '2020-04-14 09:44:10.842760', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 09:44:10.847679', '2020-04-14 09:44:10.847679'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.8ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.3ms) COMMIT  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 0.7ms | Allocations: 2157)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:10.966850' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 1.4ms | Allocations: 332) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 1.3ms | Allocations: 96) Completed 200 OK in 476ms (Views: 465.0ms | ActiveRecord: 2.1ms | Allocations: 528203)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:11.451700' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 10ms (ActiveRecord: 2.7ms | Allocations: 2629)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:11.472403' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:44:11.473890' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 8ms (ActiveRecord: 2.2ms | Allocations: 2591)  (0.8ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.0ms | Allocations: 418)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 22) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 20) Completed 200 OK in 30ms (Views: 6.1ms | ActiveRecord: 2.3ms | Allocations: 10126)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:44:11.546344' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 512)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:11.555158' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 512)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:44:11.562601' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:11.572209' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 09:44:11.573494' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 912)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:11.582450' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:44:11.590558' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:11.598150' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 877)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [07902db5-565e-4c4a-8c7e-65b44fc3f2b0] Performing DiscoApp::SendSubscriptionJob (Job ID: 07902db5-565e-4c4a-8c7e-65b44fc3f2b0) from Test(default) enqueued at 2020-04-14T09:44:11Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [07902db5-565e-4c4a-8c7e-65b44fc3f2b0] DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [07902db5-565e-4c4a-8c7e-65b44fc3f2b0] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [07902db5-565e-4c4a-8c7e-65b44fc3f2b0] Performed DiscoApp::SendSubscriptionJob (Job ID: 07902db5-565e-4c4a-8c7e-65b44fc3f2b0) from Test(default) in 279.49ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 07902db5-565e-4c4a-8c7e-65b44fc3f2b0) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.020741' WHERE "disco_app_shops"."id" = 605094243  (0.4ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.6ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:44:12.047791' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 20ms (ActiveRecord: 3.5ms | Allocations: 7724)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.056026' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 12ms (ActiveRecord: 2.1ms | Allocations: 5495)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.078964' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 5ms (ActiveRecord: 1.8ms | Allocations: 1249)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.091952' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:44:12.110063', '2020-04-14 09:44:12.110063') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 09:44:12.121378', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 18ms (ActiveRecord: 2.8ms | Allocations: 14733)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.126716' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:44:12.138326' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.143544' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 14ms (ActiveRecord: 3.0ms | Allocations: 11645) DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.151069' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:44:12.153342' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 484)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.160402' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 1.0ms | Allocations: 1596)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.169983' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.8ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.0ms | Allocations: 456) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 8ms (Views: 2.7ms | ActiveRecord: 1.5ms | Allocations: 4470)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.187570' WHERE "disco_app_shops"."id" = 605094243  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 5ms (ActiveRecord: 1.5ms | Allocations: 1900)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:12.200190' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 222)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 171)  (0.2ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms | Allocations: 533)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226] Performing DiscoApp::SynchroniseUsersJob (Job ID: a8d64115-2c9c-4d2f-84cd-9251485eb226) from Test(default) enqueued at 2020-04-14T09:44:12Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226] DiscoApp::User Load (0.5ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226] DiscoApp::User Create (0.4ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 09:44:12.246317', '2020-04-14 09:44:12.246317') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226] DiscoApp::User Update (0.3ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 09:44:12.247916' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226] DiscoApp::User Create (0.1ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 09:44:12.249954', '2020-04-14 09:44:12.249954') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 09:44:12.250921' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [a8d64115-2c9c-4d2f-84cd-9251485eb226] Performed DiscoApp::SynchroniseUsersJob (Job ID: a8d64115-2c9c-4d2f-84cd-9251485eb226) from Test(default) in 19.76ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: a8d64115-2c9c-4d2f-84cd-9251485eb226) to Test(default) with arguments: #> DiscoApp::User Load (0.3ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (1.1ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:12.285637', '2020-04-14 09:44:12.285637') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.5ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 37  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:12.295111', '2020-04-14 09:44:12.295111') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 38  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 38  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:12.302976', '2020-04-14 09:44:12.302976') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.5ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 39  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:12.309016', '2020-04-14 09:44:12.309016') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 40  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 09:44:12.317547' WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 09:44:12.322268' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:12.330963' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] Performing DiscoApp::AppUninstalledJob (Job ID: d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d) from Test(default) enqueued at 2020-04-14T09:44:12Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:44:12.334683' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] [DiscoApp::SendSubscriptionJob] [f9336cef-b193-4846-9c28-edb6ac6f9ae4] Performing DiscoApp::SendSubscriptionJob (Job ID: f9336cef-b193-4846-9c28-edb6ac6f9ae4) from Test(default) enqueued at 2020-04-14T09:44:12Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] [DiscoApp::SendSubscriptionJob] [f9336cef-b193-4846-9c28-edb6ac6f9ae4] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] [DiscoApp::SendSubscriptionJob] [f9336cef-b193-4846-9c28-edb6ac6f9ae4] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] [DiscoApp::SendSubscriptionJob] [f9336cef-b193-4846-9c28-edb6ac6f9ae4] Performed DiscoApp::SendSubscriptionJob (Job ID: f9336cef-b193-4846-9c28-edb6ac6f9ae4) from Test(default) in 13.9ms [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] Enqueued DiscoApp::SendSubscriptionJob (Job ID: f9336cef-b193-4846-9c28-edb6ac6f9ae4) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] DiscoApp::Session Destroy (0.4ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:44:12.358780', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:44:12.360935' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d] Performed DiscoApp::AppUninstalledJob (Job ID: d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d) from Test(default) in 28.39ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: d24a7dc6-6be4-4d3a-8f08-f37e4bdf4e4d) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:12.365832' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] Performing DiscoApp::AppUninstalledJob (Job ID: 8ad2ff50-1163-453b-9d2e-673e00716b99) from Test(default) enqueued at 2020-04-14T09:44:12Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:44:12.368787' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] [DiscoApp::SendSubscriptionJob] [686a4278-8800-4cc0-b8f3-c8e3eead4699] Performing DiscoApp::SendSubscriptionJob (Job ID: 686a4278-8800-4cc0-b8f3-c8e3eead4699) from Test(default) enqueued at 2020-04-14T09:44:12Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] [DiscoApp::SendSubscriptionJob] [686a4278-8800-4cc0-b8f3-c8e3eead4699] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] [DiscoApp::SendSubscriptionJob] [686a4278-8800-4cc0-b8f3-c8e3eead4699] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] [DiscoApp::SendSubscriptionJob] [686a4278-8800-4cc0-b8f3-c8e3eead4699] Performed DiscoApp::SendSubscriptionJob (Job ID: 686a4278-8800-4cc0-b8f3-c8e3eead4699) from Test(default) in 14.89ms [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 686a4278-8800-4cc0-b8f3-c8e3eead4699) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:44:12.389065', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:44:12.390772' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8ad2ff50-1163-453b-9d2e-673e00716b99] Performed DiscoApp::AppUninstalledJob (Job ID: 8ad2ff50-1163-453b-9d2e-673e00716b99) from Test(default) in 23.91ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 8ad2ff50-1163-453b-9d2e-673e00716b99) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [32e38613-f282-456a-8503-c5c78a3cc123] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 32e38613-f282-456a-8503-c5c78a3cc123) from Test(default) enqueued at 2020-04-14T09:44:12Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [32e38613-f282-456a-8503-c5c78a3cc123] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 32e38613-f282-456a-8503-c5c78a3cc123) from Test(default) in 4.34ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: 32e38613-f282-456a-8503-c5c78a3cc123) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: d4b3cb8e-4191-4146-909c-638f9d967582) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: c7292a70-ce64-4111-895c-8a64aae079c7) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.4ms | Allocations: 117)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.4ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.4ms | Allocations: 117)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.3ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: f230c60a-ad1e-46f4-aeb7-7f6a866655ef) to Test(default) with arguments: #>, #>, "widget_assets"  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 6800b0a1-a962-4488-a889-3d16cb6f4c01) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: cf796011-8895-41d4-a369-e2aed76f27d5) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 9ecaf8b7-41dc-4810-976d-3a81b2a1a549) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.4ms | Allocations: 109) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.4ms | Allocations: 141)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.4ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: c58d4f18-4ac8-4829-8837-13f8e3a37d6b) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.1ms | Allocations: 7)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.6ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:13.191918' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] Performing DiscoApp::AppInstalledJob (Job ID: b6837a57-117b-449b-9ae4-18a180cadac0) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:44:13.195521' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SynchroniseWebhooksJob] [5d9f3cb3-0f58-4630-9745-9f778e88cfbb] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 5d9f3cb3-0f58-4630-9745-9f778e88cfbb) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SynchroniseWebhooksJob] [5d9f3cb3-0f58-4630-9745-9f778e88cfbb] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 5d9f3cb3-0f58-4630-9745-9f778e88cfbb) from Test(default) in 73.52ms [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SynchroniseCarrierServiceJob] [577e07f2-7641-4a30-bbe4-f112531a9188] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 577e07f2-7641-4a30-bbe4-f112531a9188) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SynchroniseCarrierServiceJob] [577e07f2-7641-4a30-bbe4-f112531a9188] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 577e07f2-7641-4a30-bbe4-f112531a9188) from Test(default) in 3.49ms [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::ShopUpdateJob] [fa1dda17-ac6b-4df8-8487-0a0b6125341d] Performing DiscoApp::ShopUpdateJob (Job ID: fa1dda17-ac6b-4df8-8487-0a0b6125341d) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::ShopUpdateJob] [fa1dda17-ac6b-4df8-8487-0a0b6125341d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::ShopUpdateJob] [fa1dda17-ac6b-4df8-8487-0a0b6125341d] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::ShopUpdateJob] [fa1dda17-ac6b-4df8-8487-0a0b6125341d] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::ShopUpdateJob] [fa1dda17-ac6b-4df8-8487-0a0b6125341d]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::ShopUpdateJob] [fa1dda17-ac6b-4df8-8487-0a0b6125341d] Performed DiscoApp::ShopUpdateJob (Job ID: fa1dda17-ac6b-4df8-8487-0a0b6125341d) from Test(default) in 7.13ms [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.287109' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Subscription Create (0.6ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 09:44:13.298453', '2020-04-14 09:44:13.298453', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857542 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SubscriptionChangedJob] [07e763ee-8a03-4bbf-9e40-04916363ea65] Performing DiscoApp::SubscriptionChangedJob (Job ID: 07e763ee-8a03-4bbf-9e40-04916363ea65) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SubscriptionChangedJob] [07e763ee-8a03-4bbf-9e40-04916363ea65] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SubscriptionChangedJob] [07e763ee-8a03-4bbf-9e40-04916363ea65] [DiscoApp::SendSubscriptionJob] [028dad59-e4fb-4713-85ca-5f9b400fa8b1] Performing DiscoApp::SendSubscriptionJob (Job ID: 028dad59-e4fb-4713-85ca-5f9b400fa8b1) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SubscriptionChangedJob] [07e763ee-8a03-4bbf-9e40-04916363ea65] [DiscoApp::SendSubscriptionJob] [028dad59-e4fb-4713-85ca-5f9b400fa8b1] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SubscriptionChangedJob] [07e763ee-8a03-4bbf-9e40-04916363ea65] [DiscoApp::SendSubscriptionJob] [028dad59-e4fb-4713-85ca-5f9b400fa8b1] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SubscriptionChangedJob] [07e763ee-8a03-4bbf-9e40-04916363ea65] [DiscoApp::SendSubscriptionJob] [028dad59-e4fb-4713-85ca-5f9b400fa8b1] Performed DiscoApp::SendSubscriptionJob (Job ID: 028dad59-e4fb-4713-85ca-5f9b400fa8b1) from Test(default) in 13.43ms [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SubscriptionChangedJob] [07e763ee-8a03-4bbf-9e40-04916363ea65] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 028dad59-e4fb-4713-85ca-5f9b400fa8b1) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] [DiscoApp::SubscriptionChangedJob] [07e763ee-8a03-4bbf-9e40-04916363ea65] Performed DiscoApp::SubscriptionChangedJob (Job ID: 07e763ee-8a03-4bbf-9e40-04916363ea65) from Test(default) in 14.67ms [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 07e763ee-8a03-4bbf-9e40-04916363ea65) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.320185' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b6837a57-117b-449b-9ae4-18a180cadac0] Performed DiscoApp::AppInstalledJob (Job ID: b6837a57-117b-449b-9ae4-18a180cadac0) from Test(default) in 127.25ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: b6837a57-117b-449b-9ae4-18a180cadac0) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:13.336105' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] Performing DiscoApp::AppInstalledJob (Job ID: 496a92e0-81ae-43a9-bc2a-47782f3e6184) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:44:13.339680' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SynchroniseWebhooksJob] [bd16dd19-a064-405d-8a7a-73be740a1cae] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: bd16dd19-a064-405d-8a7a-73be740a1cae) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SynchroniseWebhooksJob] [bd16dd19-a064-405d-8a7a-73be740a1cae] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: bd16dd19-a064-405d-8a7a-73be740a1cae) from Test(default) in 11.95ms [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SynchroniseCarrierServiceJob] [c22a5864-ba70-4d7c-a519-e0e31caeb4d7] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: c22a5864-ba70-4d7c-a519-e0e31caeb4d7) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SynchroniseCarrierServiceJob] [c22a5864-ba70-4d7c-a519-e0e31caeb4d7] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: c22a5864-ba70-4d7c-a519-e0e31caeb4d7) from Test(default) in 3.56ms [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::ShopUpdateJob] [29a140ae-946b-42e8-9c5f-ff605b739b6b] Performing DiscoApp::ShopUpdateJob (Job ID: 29a140ae-946b-42e8-9c5f-ff605b739b6b) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::ShopUpdateJob] [29a140ae-946b-42e8-9c5f-ff605b739b6b]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::ShopUpdateJob] [29a140ae-946b-42e8-9c5f-ff605b739b6b] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::ShopUpdateJob] [29a140ae-946b-42e8-9c5f-ff605b739b6b] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::ShopUpdateJob] [29a140ae-946b-42e8-9c5f-ff605b739b6b]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::ShopUpdateJob] [29a140ae-946b-42e8-9c5f-ff605b739b6b] Performed DiscoApp::ShopUpdateJob (Job ID: 29a140ae-946b-42e8-9c5f-ff605b739b6b) from Test(default) in 5.17ms [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.363564' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:44:13.364488', '2020-04-14 09:44:13.364488') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857543 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SubscriptionChangedJob] [b240789a-91c4-4d7a-b8e8-e260c9704a48] Performing DiscoApp::SubscriptionChangedJob (Job ID: b240789a-91c4-4d7a-b8e8-e260c9704a48) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SubscriptionChangedJob] [b240789a-91c4-4d7a-b8e8-e260c9704a48] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SubscriptionChangedJob] [b240789a-91c4-4d7a-b8e8-e260c9704a48] [DiscoApp::SendSubscriptionJob] [c11f4164-aa9c-4155-b7e5-2d025d8ce5ae] Performing DiscoApp::SendSubscriptionJob (Job ID: c11f4164-aa9c-4155-b7e5-2d025d8ce5ae) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SubscriptionChangedJob] [b240789a-91c4-4d7a-b8e8-e260c9704a48] [DiscoApp::SendSubscriptionJob] [c11f4164-aa9c-4155-b7e5-2d025d8ce5ae] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SubscriptionChangedJob] [b240789a-91c4-4d7a-b8e8-e260c9704a48] [DiscoApp::SendSubscriptionJob] [c11f4164-aa9c-4155-b7e5-2d025d8ce5ae] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SubscriptionChangedJob] [b240789a-91c4-4d7a-b8e8-e260c9704a48] [DiscoApp::SendSubscriptionJob] [c11f4164-aa9c-4155-b7e5-2d025d8ce5ae] Performed DiscoApp::SendSubscriptionJob (Job ID: c11f4164-aa9c-4155-b7e5-2d025d8ce5ae) from Test(default) in 12.92ms [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SubscriptionChangedJob] [b240789a-91c4-4d7a-b8e8-e260c9704a48] Enqueued DiscoApp::SendSubscriptionJob (Job ID: c11f4164-aa9c-4155-b7e5-2d025d8ce5ae) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] [DiscoApp::SubscriptionChangedJob] [b240789a-91c4-4d7a-b8e8-e260c9704a48] Performed DiscoApp::SubscriptionChangedJob (Job ID: b240789a-91c4-4d7a-b8e8-e260c9704a48) from Test(default) in 14.15ms [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b240789a-91c4-4d7a-b8e8-e260c9704a48) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.383493' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [496a92e0-81ae-43a9-bc2a-47782f3e6184] Performed DiscoApp::AppInstalledJob (Job ID: 496a92e0-81ae-43a9-bc2a-47782f3e6184) from Test(default) in 46.34ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 496a92e0-81ae-43a9-bc2a-47782f3e6184) to Test(default) with arguments: #> DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:13.391851' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] Performing DiscoApp::AppInstalledJob (Job ID: 2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:44:13.395456' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SynchroniseWebhooksJob] [aa7aa4fa-53ed-483b-ba58-f2c32a5e609b] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: aa7aa4fa-53ed-483b-ba58-f2c32a5e609b) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SynchroniseWebhooksJob] [aa7aa4fa-53ed-483b-ba58-f2c32a5e609b] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: aa7aa4fa-53ed-483b-ba58-f2c32a5e609b) from Test(default) in 12.66ms [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SynchroniseCarrierServiceJob] [d5b6bd84-38d8-45a2-b43d-94153fe75f67] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: d5b6bd84-38d8-45a2-b43d-94153fe75f67) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SynchroniseCarrierServiceJob] [d5b6bd84-38d8-45a2-b43d-94153fe75f67] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: d5b6bd84-38d8-45a2-b43d-94153fe75f67) from Test(default) in 3.18ms [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::ShopUpdateJob] [645b4278-5a1c-4b6e-9b9b-e829c5634e87] Performing DiscoApp::ShopUpdateJob (Job ID: 645b4278-5a1c-4b6e-9b9b-e829c5634e87) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::ShopUpdateJob] [645b4278-5a1c-4b6e-9b9b-e829c5634e87]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::ShopUpdateJob] [645b4278-5a1c-4b6e-9b9b-e829c5634e87] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::ShopUpdateJob] [645b4278-5a1c-4b6e-9b9b-e829c5634e87] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::ShopUpdateJob] [645b4278-5a1c-4b6e-9b9b-e829c5634e87]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::ShopUpdateJob] [645b4278-5a1c-4b6e-9b9b-e829c5634e87] Performed DiscoApp::ShopUpdateJob (Job ID: 645b4278-5a1c-4b6e-9b9b-e829c5634e87) from Test(default) in 4.99ms [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.420040' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0]  (0.4ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:44:13.421261', '2020-04-14 09:44:13.421261') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857544 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SubscriptionChangedJob] [42fbd121-1f57-4d76-ae33-b1c525c717a8] Performing DiscoApp::SubscriptionChangedJob (Job ID: 42fbd121-1f57-4d76-ae33-b1c525c717a8) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SubscriptionChangedJob] [42fbd121-1f57-4d76-ae33-b1c525c717a8] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SubscriptionChangedJob] [42fbd121-1f57-4d76-ae33-b1c525c717a8] [DiscoApp::SendSubscriptionJob] [c357bcb9-f1e5-479c-86ae-1785973cf5d5] Performing DiscoApp::SendSubscriptionJob (Job ID: c357bcb9-f1e5-479c-86ae-1785973cf5d5) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SubscriptionChangedJob] [42fbd121-1f57-4d76-ae33-b1c525c717a8] [DiscoApp::SendSubscriptionJob] [c357bcb9-f1e5-479c-86ae-1785973cf5d5] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SubscriptionChangedJob] [42fbd121-1f57-4d76-ae33-b1c525c717a8] [DiscoApp::SendSubscriptionJob] [c357bcb9-f1e5-479c-86ae-1785973cf5d5] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SubscriptionChangedJob] [42fbd121-1f57-4d76-ae33-b1c525c717a8] [DiscoApp::SendSubscriptionJob] [c357bcb9-f1e5-479c-86ae-1785973cf5d5] Performed DiscoApp::SendSubscriptionJob (Job ID: c357bcb9-f1e5-479c-86ae-1785973cf5d5) from Test(default) in 12.73ms [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SubscriptionChangedJob] [42fbd121-1f57-4d76-ae33-b1c525c717a8] Enqueued DiscoApp::SendSubscriptionJob (Job ID: c357bcb9-f1e5-479c-86ae-1785973cf5d5) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] [DiscoApp::SubscriptionChangedJob] [42fbd121-1f57-4d76-ae33-b1c525c717a8] Performed DiscoApp::SubscriptionChangedJob (Job ID: 42fbd121-1f57-4d76-ae33-b1c525c717a8) from Test(default) in 14.01ms [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 42fbd121-1f57-4d76-ae33-b1c525c717a8) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.440927' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0] Performed DiscoApp::AppInstalledJob (Job ID: 2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0) from Test(default) in 48.26ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 2aa4d5e2-52d0-41cb-a2b8-b8df82fcecb0) to Test(default) with arguments: #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [18f6e682-36e8-4efd-9ebf-26192dd8e776] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 18f6e682-36e8-4efd-9ebf-26192dd8e776) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [18f6e682-36e8-4efd-9ebf-26192dd8e776] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 18f6e682-36e8-4efd-9ebf-26192dd8e776) from Test(default) in 11.47ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 18f6e682-36e8-4efd-9ebf-26192dd8e776) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [4dfffaba-9800-4d51-8efc-9116dfd2169b] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 4dfffaba-9800-4d51-8efc-9116dfd2169b) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [4dfffaba-9800-4d51-8efc-9116dfd2169b] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 4dfffaba-9800-4d51-8efc-9116dfd2169b) from Test(default) in 18.43ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 4dfffaba-9800-4d51-8efc-9116dfd2169b) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.492212' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 7.6ms | Allocations: 3100) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 1.6ms | Allocations: 6519)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.514126' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.524811' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:13.525883', '2020-04-14 09:44:13.525883', '2020-04-14 09:44:13.525420', '2020-05-12 09:44:13.525444', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d5313999-f32d-413c-a13b-b55563c53aa1) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 12ms (ActiveRecord: 3.8ms | Allocations: 4139) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.534223' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 5.0ms | Allocations: 2854) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 13ms (Views: 5.5ms | ActiveRecord: 2.9ms | Allocations: 6824)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.552260' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.561013' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:13.562158', '2020-04-14 09:44:13.562158', '2020-04-14 09:44:13.561709', '2020-05-12 09:44:13.561724', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 0f2f6ebd-ef22-42ef-9299-39c33a1fc3a7) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 8ms (ActiveRecord: 2.2ms | Allocations: 3051) DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.573586' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 6ms (ActiveRecord: 1.7ms | Allocations: 2415) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.586872' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 214)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.593470' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.601716' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:13.604191', '2020-04-14 09:44:13.604191', '2020-04-14 09:44:13.603677', '2020-06-13 09:44:13.603695', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 1c51de7b-de32-4a37-befb-0e858e24a1cb) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 13ms (ActiveRecord: 3.5ms | Allocations: 4387) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:13.616195' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:44:13.618432' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 479)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:13.627572', '2020-04-14 09:44:13.627572') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: b9d90e27-82ac-4db6-85af-ca229adbe278) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 41 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 41 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:13.634596', '2020-04-14 09:44:13.634596') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 86c21b45-58e0-421e-88e8-d31760378010) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:44:13 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [3952307b-2ed3-43ec-99ac-12bc0f220422] Performing ProductsUpdateJob (Job ID: 3952307b-2ed3-43ec-99ac-12bc0f220422) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [3952307b-2ed3-43ec-99ac-12bc0f220422] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [3952307b-2ed3-43ec-99ac-12bc0f220422] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [3952307b-2ed3-43ec-99ac-12bc0f220422]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [3952307b-2ed3-43ec-99ac-12bc0f220422] Product Update (0.6ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:44:13.687303' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [3952307b-2ed3-43ec-99ac-12bc0f220422]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [3952307b-2ed3-43ec-99ac-12bc0f220422] Performed ProductsUpdateJob (Job ID: 3952307b-2ed3-43ec-99ac-12bc0f220422) from Test(default) in 4.6ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: 3952307b-2ed3-43ec-99ac-12bc0f220422) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 1.5ms | Allocations: 8728) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:44:13 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [c8a6c5f3-fa90-46e3-b644-b0a07c8d71df] Performing CartsUpdateJob (Job ID: c8a6c5f3-fa90-46e3-b644-b0a07c8d71df) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [c8a6c5f3-fa90-46e3-b644-b0a07c8d71df] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [c8a6c5f3-fa90-46e3-b644-b0a07c8d71df] Cart Load (0.2ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [c8a6c5f3-fa90-46e3-b644-b0a07c8d71df]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [c8a6c5f3-fa90-46e3-b644-b0a07c8d71df] Cart Update (0.2ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 09:44:13.703386' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [c8a6c5f3-fa90-46e3-b644-b0a07c8d71df]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [c8a6c5f3-fa90-46e3-b644-b0a07c8d71df] Performed CartsUpdateJob (Job ID: c8a6c5f3-fa90-46e3-b644-b0a07c8d71df) from Test(default) in 6.11ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: c8a6c5f3-fa90-46e3-b644-b0a07c8d71df) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.2ms | ActiveRecord: 1.0ms | Allocations: 6342) Cart Load (0.2ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:44:13.711018' WHERE "products"."id" = 632910393  (0.1ms) RELEASE SAVEPOINT active_record_1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:44:13 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [f79b3880-56e2-48b9-91b2-dfb960bd6879] Performing ProductsDeleteJob (Job ID: f79b3880-56e2-48b9-91b2-dfb960bd6879) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [f79b3880-56e2-48b9-91b2-dfb960bd6879] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [f79b3880-56e2-48b9-91b2-dfb960bd6879] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [f79b3880-56e2-48b9-91b2-dfb960bd6879]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [f79b3880-56e2-48b9-91b2-dfb960bd6879] Product Destroy (0.3ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [f79b3880-56e2-48b9-91b2-dfb960bd6879]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [f79b3880-56e2-48b9-91b2-dfb960bd6879] Performed ProductsDeleteJob (Job ID: f79b3880-56e2-48b9-91b2-dfb960bd6879) from Test(default) in 2.23ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: f79b3880-56e2-48b9-91b2-dfb960bd6879) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.1ms | Allocations: 1697)  (0.2ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:44:13 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [3539f3fe-bc08-4789-9309-d8c4ed942a58] Performing ProductsCreateJob (Job ID: 3539f3fe-bc08-4789-9309-d8c4ed942a58) from Test(default) enqueued at 2020-04-14T09:44:13Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [3539f3fe-bc08-4789-9309-d8c4ed942a58] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [3539f3fe-bc08-4789-9309-d8c4ed942a58] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [3539f3fe-bc08-4789-9309-d8c4ed942a58]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [3539f3fe-bc08-4789-9309-d8c4ed942a58] Product Create (0.6ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 09:44:13.731720', '2020-04-14 09:44:13.731720') RETURNING "id" [ActiveJob] [ProductsCreateJob] [3539f3fe-bc08-4789-9309-d8c4ed942a58]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [3539f3fe-bc08-4789-9309-d8c4ed942a58] Performed ProductsCreateJob (Job ID: 3539f3fe-bc08-4789-9309-d8c4ed942a58) from Test(default) in 39.79ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 3539f3fe-bc08-4789-9309-d8c4ed942a58) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 43ms (Views: 0.3ms | ActiveRecord: 1.6ms | Allocations: 12386) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.7ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.6ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:13.811505', '2020-04-14 09:44:13.811505') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.5ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 37  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.5ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:13.832304', '2020-04-14 09:44:13.832304') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 38  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:13.837640', '2020-04-14 09:44:13.837640') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 39  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:13.842282', '2020-04-14 09:44:13.842282') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 40  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.5ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:44:13.867904', '2020-04-14 09:44:13.867904', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 09:44:13.869657', '2020-04-14 09:44:13.869657') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.3ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:44:13.874444', '2020-04-14 09:44:13.874444', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:44:13.877885', '2020-04-14 09:44:13.877885', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.881075' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:13.881075', '2020-04-14 09:44:13.881075', '2020-04-14 09:44:13.881075', '2020-05-12 09:44:13.881075', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6e4457ef-5728-492e-8bef-d6edb82b579b) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.890331' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:13.890331', '2020-04-14 09:44:13.890331', '2020-04-14 09:44:13.890331', '2020-06-13 09:44:13.890331', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 681a0318-24a8-4101-837f-9922fef1f389) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.898434' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:13.898434', '2020-04-14 09:44:13.898434', '2020-04-14 09:44:13.898434', '2020-05-12 09:44:13.898434', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: fee1c911-3b47-40fb-8110-e8f76c1a4767) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.910237' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:13.910237', '2020-04-14 09:44:13.910237', '2020-04-14 09:44:13.910237', '2020-05-12 09:44:13.910237', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 014a2b47-84d0-4e36-9ad2-fe1dbd53ee46) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857551 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857551 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.920693' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:13.920693', '2020-04-14 09:44:13.920693', '2020-04-14 09:44:13.920693', '2020-05-12 09:44:13.920693', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 3f42de05-32e3-49c0-818e-bac456a1edf2) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:13.927790' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 09:44:13.927790', '2020-04-14 09:44:13.927790') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 2f0b6376-521f-488c-9edc-3f520127b1fa) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:13.935478', '2020-04-14 09:44:13.935478') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 8aa17330-b821-4b64-a52b-3397d6c05864) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:13.941218', '2020-04-14 09:44:13.941218') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 88ef22c2-3d99-4c45-b3c2-8d3a4afab2b2) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 42 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 42 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 130)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:13.954044' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 6bef7c3e-6eb6-4e0b-b75d-0a9c3c030cad) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms | Allocations: 2068)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 126)  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:13.965930' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 9fe34547-78a7-46ec-a479-71ebcaa1d860) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms | Allocations: 2066)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:44:13.972650' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:44:13.988781', '2020-04-14 09:44:13.988781') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:44:14.000135' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:44:14.017340' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:44:14.026205' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:44:14.050003' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.3ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 09:44:14.067034', '2020-04-14 09:44:14.067034') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:14.082062' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:14.086242' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 696c1b4c-8c0e-481c-a881-50facbee4f05) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.1ms | Allocations: 1929) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 344)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:44:14.092813' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.5ms | Allocations: 88) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 4ms (Views: 2.3ms | ActiveRecord: 0.4ms | Allocations: 3040)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:14.101460' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 625)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:44:14.108159' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:14.115834' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 0522b8a2-b5be-4768-aadd-a7164800f5ef) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.3ms | Allocations: 1877) DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.6ms | Allocations: 85) Completed 404 Not Found in 4ms (Views: 2.9ms | ActiveRecord: 0.3ms | Allocations: 2004)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms | Allocations: 376)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 163)  (0.1ms) ROLLBACK  (0.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment'  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment'  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment'  (146.7ms) DROP DATABASE IF EXISTS "disco_app_test"  (307.0ms) CREATE DATABASE "disco_app_test" ENCODING = 'unicode' SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (0.2ms) DROP TABLE IF EXISTS "carts" CASCADE  (4.8ms) CREATE TABLE "carts" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "token" character varying, "data" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.0ms) CREATE UNIQUE INDEX "index_carts_on_token" ON "carts" ("token")  (0.1ms) DROP TABLE IF EXISTS "disco_app_app_settings" CASCADE  (1.4ms) CREATE TABLE "disco_app_app_settings" ("id" serial NOT NULL PRIMARY KEY, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) DROP TABLE IF EXISTS "disco_app_application_charges" CASCADE  (2.1ms) CREATE TABLE "disco_app_application_charges" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "subscription_id" bigint, "status" integer DEFAULT 0, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "shopify_id" bigint, "confirmation_url" character varying)  (0.2ms) DROP TABLE IF EXISTS "disco_app_flow_actions" CASCADE  (2.1ms) CREATE TABLE "disco_app_flow_actions" ("id" bigserial primary key, "shop_id" bigint, "action_id" character varying, "action_run_id" character varying, "properties" jsonb DEFAULT '{}', "status" integer DEFAULT 0, "processed_at" timestamp, "processing_errors" jsonb DEFAULT '[]', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.6ms) CREATE UNIQUE INDEX "index_disco_app_flow_actions_on_action_run_id" ON "disco_app_flow_actions" ("action_run_id")  (0.1ms) DROP TABLE IF EXISTS "disco_app_flow_triggers" CASCADE  (1.8ms) CREATE TABLE "disco_app_flow_triggers" ("id" bigserial primary key, "shop_id" bigint, "title" character varying, "resource_name" character varying, "resource_url" character varying, "properties" jsonb DEFAULT '{}', "status" integer DEFAULT 0, "processed_at" timestamp, "processing_errors" jsonb DEFAULT '[]', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) DROP TABLE IF EXISTS "disco_app_plan_codes" CASCADE  (2.0ms) CREATE TABLE "disco_app_plan_codes" ("id" serial NOT NULL PRIMARY KEY, "plan_id" bigint, "code" character varying, "trial_period_days" integer, "amount" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "status" integer DEFAULT 0)  (0.2ms) DROP TABLE IF EXISTS "disco_app_plans" CASCADE  (1.9ms) CREATE TABLE "disco_app_plans" ("id" serial NOT NULL PRIMARY KEY, "status" integer DEFAULT 0, "name" character varying, "plan_type" integer DEFAULT 0, "trial_period_days" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "amount" integer DEFAULT 0, "currency" character varying DEFAULT 'USD', "interval" integer DEFAULT 0, "interval_count" integer DEFAULT 1)  (0.1ms) DROP TABLE IF EXISTS "disco_app_recurring_application_charges" CASCADE  (1.8ms) CREATE TABLE "disco_app_recurring_application_charges" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "subscription_id" bigint, "status" integer DEFAULT 0, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "shopify_id" bigint, "confirmation_url" character varying)  (0.1ms) DROP TABLE IF EXISTS "disco_app_sessions" CASCADE  (1.8ms) CREATE TABLE "disco_app_sessions" ("id" serial NOT NULL PRIMARY KEY, "session_id" character varying NOT NULL, "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "shop_id" integer)  (0.7ms) CREATE UNIQUE INDEX "index_disco_app_sessions_on_session_id" ON "disco_app_sessions" ("session_id")  (0.6ms) CREATE INDEX "index_disco_app_sessions_on_updated_at" ON "disco_app_sessions" ("updated_at")  (0.1ms) DROP TABLE IF EXISTS "disco_app_shops" CASCADE  (2.0ms) CREATE TABLE "disco_app_shops" ("id" serial NOT NULL PRIMARY KEY, "shopify_domain" character varying NOT NULL, "shopify_token" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "status" integer DEFAULT 0, "domain" character varying, "plan_name" character varying, "name" character varying, "data" jsonb DEFAULT '{}')  (0.5ms) CREATE UNIQUE INDEX "index_disco_app_shops_on_shopify_domain" ON "disco_app_shops" ("shopify_domain")  (0.1ms) DROP TABLE IF EXISTS "disco_app_sources" CASCADE  (1.7ms) CREATE TABLE "disco_app_sources" ("id" serial NOT NULL PRIMARY KEY, "source" character varying, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.5ms) CREATE INDEX "index_disco_app_sources_on_source" ON "disco_app_sources" ("source")  (0.2ms) DROP TABLE IF EXISTS "disco_app_subscriptions" CASCADE  (1.3ms) CREATE TABLE "disco_app_subscriptions" ("id" serial NOT NULL PRIMARY KEY, "shop_id" integer, "plan_id" integer, "status" integer, "subscription_type" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "trial_start_at" timestamp, "trial_end_at" timestamp, "cancelled_at" timestamp, "amount" integer DEFAULT 0, "plan_code_id" bigint, "trial_period_days" integer, "source_id" bigint)  (0.5ms) CREATE INDEX "index_disco_app_subscriptions_on_plan_id" ON "disco_app_subscriptions" ("plan_id")  (0.4ms) CREATE INDEX "index_disco_app_subscriptions_on_shop_id" ON "disco_app_subscriptions" ("shop_id")  (0.1ms) DROP TABLE IF EXISTS "disco_app_users" CASCADE  (1.6ms) CREATE TABLE "disco_app_users" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "first_name" character varying, "last_name" character varying, "email" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.5ms) CREATE UNIQUE INDEX "index_disco_app_users_on_id_and_shop_id" ON "disco_app_users" ("id", "shop_id")  (0.1ms) DROP TABLE IF EXISTS "js_configurations" CASCADE  (1.6ms) CREATE TABLE "js_configurations" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "label" character varying DEFAULT 'Default', "locale" character varying DEFAULT 'en')  (0.2ms) DROP TABLE IF EXISTS "products" CASCADE  (1.8ms) CREATE TABLE "products" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "data" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) DROP TABLE IF EXISTS "widget_configurations" CASCADE  (1.9ms) CREATE TABLE "widget_configurations" ("id" serial NOT NULL PRIMARY KEY, "shop_id" bigint, "label" character varying DEFAULT 'Default', "locale" character varying DEFAULT 'en', "background_color" character varying DEFAULT '#FFFFFF')  (1.4ms) ALTER TABLE "carts" ADD CONSTRAINT "fk_rails_faed68a831" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (0.8ms) ALTER TABLE "disco_app_application_charges" ADD CONSTRAINT "fk_rails_0db59d7de6" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (0.8ms) ALTER TABLE "disco_app_application_charges" ADD CONSTRAINT "fk_rails_2a78d31722" FOREIGN KEY ("subscription_id") REFERENCES "disco_app_subscriptions" ("id")   (0.8ms) ALTER TABLE "disco_app_flow_actions" ADD CONSTRAINT "fk_rails_4640aa9452" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id") ON DELETE CASCADE  (0.7ms) ALTER TABLE "disco_app_flow_triggers" ADD CONSTRAINT "fk_rails_2e38b229ab" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id") ON DELETE CASCADE  (0.8ms) ALTER TABLE "disco_app_plan_codes" ADD CONSTRAINT "fk_rails_d0a909a853" FOREIGN KEY ("plan_id") REFERENCES "disco_app_plans" ("id")   (0.8ms) ALTER TABLE "disco_app_recurring_application_charges" ADD CONSTRAINT "fk_rails_be8ecf206c" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (0.7ms) ALTER TABLE "disco_app_recurring_application_charges" ADD CONSTRAINT "fk_rails_e1ff4c71cc" FOREIGN KEY ("subscription_id") REFERENCES "disco_app_subscriptions" ("id")   (0.7ms) ALTER TABLE "disco_app_sessions" ADD CONSTRAINT "fk_rails_babbf55f7d" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id") ON DELETE CASCADE  (0.7ms) ALTER TABLE "disco_app_subscriptions" ADD CONSTRAINT "fk_rails_a96be2a4bb" FOREIGN KEY ("plan_code_id") REFERENCES "disco_app_plan_codes" ("id")   (0.7ms) ALTER TABLE "disco_app_subscriptions" ADD CONSTRAINT "fk_rails_baa4cade5a" FOREIGN KEY ("source_id") REFERENCES "disco_app_sources" ("id")   (0.7ms) ALTER TABLE "js_configurations" ADD CONSTRAINT "fk_rails_3d59259642" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (0.7ms) ALTER TABLE "products" ADD CONSTRAINT "fk_rails_b169a26347" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (1.0ms) ALTER TABLE "widget_configurations" ADD CONSTRAINT "fk_rails_d4f17b6c5c" FOREIGN KEY ("shop_id") REFERENCES "disco_app_shops" ("id")   (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES (20181229100327)  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES (20150525000000), (20160307182229), (20160530160739), (20161105054746), (20170315062548), (20170315062629), (20170327214540), (20170606160751);   (1.7ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL) ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' LIMIT 1  (0.2ms) BEGIN ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'test', '2020-04-14 09:44:37.885361', '2020-04-14 09:44:37.885361') RETURNING "key"  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'environment' LIMIT 1 ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' LIMIT 1  (0.1ms) BEGIN ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '9f2c42fec6d83025c8c05e017f471ec0d4b63e9b', '2020-04-14 09:44:37.888774', '2020-04-14 09:44:37.888774') RETURNING "key"  (0.2ms) COMMIT  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.2ms) BEGIN  (1.3ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN Fixtures Load (3.6ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 09:44:38.305119', '2020-04-14 09:44:38.305119'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 09:44:38.309392', '2020-04-14 09:44:38.309392', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 09:44:38.309392', '2020-04-14 09:44:38.309392', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 09:44:38.314391', '2020-04-14 09:44:38.314391', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 09:44:38.314391', '2020-04-14 09:44:38.314391', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 09:44:38.316962', '2020-04-14 09:44:38.316962', DEFAULT, DEFAULT, '2020-04-07 09:44:38', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 09:44:38.316962', '2020-04-14 09:44:38.316962', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 09:44:38.319985', '2020-04-14 09:44:38.319985'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 09:44:38.322381', '2020-04-14 09:44:38.322381', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 09:44:38.324810', '2020-04-14 09:44:38.324810', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 09:44:38.324810', '2020-04-14 09:44:38.324810', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 09:44:38.324810', '2020-04-14 09:44:38.324810', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 09:44:38.324810', '2020-04-14 09:44:38.324810', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 09:44:38.324810', '2020-04-14 09:44:38.324810', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 09:44:38.324810', '2020-04-14 09:44:38.324810', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 09:44:38.329887', '2020-04-14 09:44:38.329887'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.3ms) COMMIT  (0.1ms) BEGIN  (2.1ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.3ms) COMMIT  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:38.471233' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] Performing DiscoApp::AppInstalledJob (Job ID: 9082d375-2ce4-49ca-a93d-b5fa0cf055cc) from Test(default) enqueued at 2020-04-14T09:44:38Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:44:38.511661' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SynchroniseWebhooksJob] [55022180-16bf-4e5b-a24c-7bd3929c52c8] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 55022180-16bf-4e5b-a24c-7bd3929c52c8) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SynchroniseWebhooksJob] [55022180-16bf-4e5b-a24c-7bd3929c52c8] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 55022180-16bf-4e5b-a24c-7bd3929c52c8) from Test(default) in 16.42ms [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SynchroniseCarrierServiceJob] [8b13f2e9-bcbd-4094-b723-ee89a672e2ff] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 8b13f2e9-bcbd-4094-b723-ee89a672e2ff) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SynchroniseCarrierServiceJob] [8b13f2e9-bcbd-4094-b723-ee89a672e2ff] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 8b13f2e9-bcbd-4094-b723-ee89a672e2ff) from Test(default) in 4.22ms [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::ShopUpdateJob] [c0cbba78-09b7-4d60-afd7-8cf530bcb478] Performing DiscoApp::ShopUpdateJob (Job ID: c0cbba78-09b7-4d60-afd7-8cf530bcb478) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::ShopUpdateJob] [c0cbba78-09b7-4d60-afd7-8cf530bcb478]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::ShopUpdateJob] [c0cbba78-09b7-4d60-afd7-8cf530bcb478] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::ShopUpdateJob] [c0cbba78-09b7-4d60-afd7-8cf530bcb478] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::ShopUpdateJob] [c0cbba78-09b7-4d60-afd7-8cf530bcb478]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::ShopUpdateJob] [c0cbba78-09b7-4d60-afd7-8cf530bcb478] Performed DiscoApp::ShopUpdateJob (Job ID: c0cbba78-09b7-4d60-afd7-8cf530bcb478) from Test(default) in 6.33ms [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:38.551575' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:44:38.554203', '2020-04-14 09:44:38.554203') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857542 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SubscriptionChangedJob] [4c08cf62-9afb-44c8-97de-6225d9cb9cc2] Performing DiscoApp::SubscriptionChangedJob (Job ID: 4c08cf62-9afb-44c8-97de-6225d9cb9cc2) from Test(default) enqueued at 2020-04-14T09:44:38Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SubscriptionChangedJob] [4c08cf62-9afb-44c8-97de-6225d9cb9cc2] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SubscriptionChangedJob] [4c08cf62-9afb-44c8-97de-6225d9cb9cc2] [DiscoApp::SendSubscriptionJob] [50890c29-7a88-48b8-95ec-5668501c7a7a] Performing DiscoApp::SendSubscriptionJob (Job ID: 50890c29-7a88-48b8-95ec-5668501c7a7a) from Test(default) enqueued at 2020-04-14T09:44:38Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SubscriptionChangedJob] [4c08cf62-9afb-44c8-97de-6225d9cb9cc2] [DiscoApp::SendSubscriptionJob] [50890c29-7a88-48b8-95ec-5668501c7a7a] DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SubscriptionChangedJob] [4c08cf62-9afb-44c8-97de-6225d9cb9cc2] [DiscoApp::SendSubscriptionJob] [50890c29-7a88-48b8-95ec-5668501c7a7a] DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SubscriptionChangedJob] [4c08cf62-9afb-44c8-97de-6225d9cb9cc2] [DiscoApp::SendSubscriptionJob] [50890c29-7a88-48b8-95ec-5668501c7a7a] Performed DiscoApp::SendSubscriptionJob (Job ID: 50890c29-7a88-48b8-95ec-5668501c7a7a) from Test(default) in 159.09ms [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SubscriptionChangedJob] [4c08cf62-9afb-44c8-97de-6225d9cb9cc2] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 50890c29-7a88-48b8-95ec-5668501c7a7a) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] [DiscoApp::SubscriptionChangedJob] [4c08cf62-9afb-44c8-97de-6225d9cb9cc2] Performed DiscoApp::SubscriptionChangedJob (Job ID: 4c08cf62-9afb-44c8-97de-6225d9cb9cc2) from Test(default) in 161.05ms [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 4c08cf62-9afb-44c8-97de-6225d9cb9cc2) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:38.722350' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9082d375-2ce4-49ca-a93d-b5fa0cf055cc] Performed DiscoApp::AppInstalledJob (Job ID: 9082d375-2ce4-49ca-a93d-b5fa0cf055cc) from Test(default) in 243.87ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 9082d375-2ce4-49ca-a93d-b5fa0cf055cc) to Test(default) with arguments: #> DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:38.734928' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] Performing DiscoApp::AppInstalledJob (Job ID: af77dbcf-9b85-460b-8ac9-ef495ec68762) from Test(default) enqueued at 2020-04-14T09:44:38Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:44:38.738656' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SynchroniseWebhooksJob] [db2f7fe0-e5d1-4147-bdf5-a3670bc9c0b2] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: db2f7fe0-e5d1-4147-bdf5-a3670bc9c0b2) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SynchroniseWebhooksJob] [db2f7fe0-e5d1-4147-bdf5-a3670bc9c0b2] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: db2f7fe0-e5d1-4147-bdf5-a3670bc9c0b2) from Test(default) in 14.73ms [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SynchroniseCarrierServiceJob] [597bb152-77f0-4aec-a38f-b51440cfcf73] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 597bb152-77f0-4aec-a38f-b51440cfcf73) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SynchroniseCarrierServiceJob] [597bb152-77f0-4aec-a38f-b51440cfcf73] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 597bb152-77f0-4aec-a38f-b51440cfcf73) from Test(default) in 20.77ms [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::ShopUpdateJob] [81b47459-c217-4298-a4a7-47af4df7d2cb] Performing DiscoApp::ShopUpdateJob (Job ID: 81b47459-c217-4298-a4a7-47af4df7d2cb) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::ShopUpdateJob] [81b47459-c217-4298-a4a7-47af4df7d2cb]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::ShopUpdateJob] [81b47459-c217-4298-a4a7-47af4df7d2cb] DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::ShopUpdateJob] [81b47459-c217-4298-a4a7-47af4df7d2cb] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::ShopUpdateJob] [81b47459-c217-4298-a4a7-47af4df7d2cb]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::ShopUpdateJob] [81b47459-c217-4298-a4a7-47af4df7d2cb] Performed DiscoApp::ShopUpdateJob (Job ID: 81b47459-c217-4298-a4a7-47af4df7d2cb) from Test(default) in 6.51ms [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:38.784884' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 09:44:38.794913', '2020-04-14 09:44:38.794913', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857543 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SubscriptionChangedJob] [6bfa0343-950f-4ba0-a40f-9beb78354d19] Performing DiscoApp::SubscriptionChangedJob (Job ID: 6bfa0343-950f-4ba0-a40f-9beb78354d19) from Test(default) enqueued at 2020-04-14T09:44:38Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SubscriptionChangedJob] [6bfa0343-950f-4ba0-a40f-9beb78354d19] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SubscriptionChangedJob] [6bfa0343-950f-4ba0-a40f-9beb78354d19] [DiscoApp::SendSubscriptionJob] [b25f9424-5e27-464d-bcbc-2ea81ff24607] Performing DiscoApp::SendSubscriptionJob (Job ID: b25f9424-5e27-464d-bcbc-2ea81ff24607) from Test(default) enqueued at 2020-04-14T09:44:38Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SubscriptionChangedJob] [6bfa0343-950f-4ba0-a40f-9beb78354d19] [DiscoApp::SendSubscriptionJob] [b25f9424-5e27-464d-bcbc-2ea81ff24607] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SubscriptionChangedJob] [6bfa0343-950f-4ba0-a40f-9beb78354d19] [DiscoApp::SendSubscriptionJob] [b25f9424-5e27-464d-bcbc-2ea81ff24607] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SubscriptionChangedJob] [6bfa0343-950f-4ba0-a40f-9beb78354d19] [DiscoApp::SendSubscriptionJob] [b25f9424-5e27-464d-bcbc-2ea81ff24607] Performed DiscoApp::SendSubscriptionJob (Job ID: b25f9424-5e27-464d-bcbc-2ea81ff24607) from Test(default) in 13.55ms [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SubscriptionChangedJob] [6bfa0343-950f-4ba0-a40f-9beb78354d19] Enqueued DiscoApp::SendSubscriptionJob (Job ID: b25f9424-5e27-464d-bcbc-2ea81ff24607) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] [DiscoApp::SubscriptionChangedJob] [6bfa0343-950f-4ba0-a40f-9beb78354d19] Performed DiscoApp::SubscriptionChangedJob (Job ID: 6bfa0343-950f-4ba0-a40f-9beb78354d19) from Test(default) in 14.94ms [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6bfa0343-950f-4ba0-a40f-9beb78354d19) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:38.815172' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [af77dbcf-9b85-460b-8ac9-ef495ec68762] Performed DiscoApp::AppInstalledJob (Job ID: af77dbcf-9b85-460b-8ac9-ef495ec68762) from Test(default) in 79.01ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: af77dbcf-9b85-460b-8ac9-ef495ec68762) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:38.826759' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] Performing DiscoApp::AppInstalledJob (Job ID: 72125bc5-797b-4b56-adbf-a62cd82c7706) from Test(default) enqueued at 2020-04-14T09:44:38Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:44:38.830726' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SynchroniseWebhooksJob] [6e7bae5f-ec34-4b36-bc2b-d56e70b6128f] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 6e7bae5f-ec34-4b36-bc2b-d56e70b6128f) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SynchroniseWebhooksJob] [6e7bae5f-ec34-4b36-bc2b-d56e70b6128f] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 6e7bae5f-ec34-4b36-bc2b-d56e70b6128f) from Test(default) in 14.95ms [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SynchroniseCarrierServiceJob] [43910e98-cd61-4027-8de2-4f012701e7c5] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 43910e98-cd61-4027-8de2-4f012701e7c5) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SynchroniseCarrierServiceJob] [43910e98-cd61-4027-8de2-4f012701e7c5] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 43910e98-cd61-4027-8de2-4f012701e7c5) from Test(default) in 3.86ms [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::ShopUpdateJob] [753a4c5e-554a-4669-9865-90f20a89f19f] Performing DiscoApp::ShopUpdateJob (Job ID: 753a4c5e-554a-4669-9865-90f20a89f19f) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::ShopUpdateJob] [753a4c5e-554a-4669-9865-90f20a89f19f]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::ShopUpdateJob] [753a4c5e-554a-4669-9865-90f20a89f19f] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::ShopUpdateJob] [753a4c5e-554a-4669-9865-90f20a89f19f] DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::ShopUpdateJob] [753a4c5e-554a-4669-9865-90f20a89f19f]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::ShopUpdateJob] [753a4c5e-554a-4669-9865-90f20a89f19f] Performed DiscoApp::ShopUpdateJob (Job ID: 753a4c5e-554a-4669-9865-90f20a89f19f) from Test(default) in 5.61ms [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:38.859047' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:44:38.860376', '2020-04-14 09:44:38.860376') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857544 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SubscriptionChangedJob] [ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1] Performing DiscoApp::SubscriptionChangedJob (Job ID: ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1) from Test(default) enqueued at 2020-04-14T09:44:38Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SubscriptionChangedJob] [ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SubscriptionChangedJob] [ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1] [DiscoApp::SendSubscriptionJob] [8c03620f-de9c-449f-9e80-7d48222f2236] Performing DiscoApp::SendSubscriptionJob (Job ID: 8c03620f-de9c-449f-9e80-7d48222f2236) from Test(default) enqueued at 2020-04-14T09:44:38Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SubscriptionChangedJob] [ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1] [DiscoApp::SendSubscriptionJob] [8c03620f-de9c-449f-9e80-7d48222f2236] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SubscriptionChangedJob] [ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1] [DiscoApp::SendSubscriptionJob] [8c03620f-de9c-449f-9e80-7d48222f2236] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SubscriptionChangedJob] [ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1] [DiscoApp::SendSubscriptionJob] [8c03620f-de9c-449f-9e80-7d48222f2236] Performed DiscoApp::SendSubscriptionJob (Job ID: 8c03620f-de9c-449f-9e80-7d48222f2236) from Test(default) in 13.28ms [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SubscriptionChangedJob] [ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 8c03620f-de9c-449f-9e80-7d48222f2236) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] [DiscoApp::SubscriptionChangedJob] [ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1] Performed DiscoApp::SubscriptionChangedJob (Job ID: ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1) from Test(default) in 14.64ms [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: ecfaaee6-4f49-4ba8-9cf9-9310ddc167c1) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:38.880427' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [72125bc5-797b-4b56-adbf-a62cd82c7706] Performed DiscoApp::AppInstalledJob (Job ID: 72125bc5-797b-4b56-adbf-a62cd82c7706) from Test(default) in 52.13ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 72125bc5-797b-4b56-adbf-a62cd82c7706) to Test(default) with arguments: #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.7ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:38.900008', '2020-04-14 09:44:38.900008') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: beafb6ab-175f-4090-aaf1-478655dab1d0) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:38.906172', '2020-04-14 09:44:38.906172') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 3d06d7c7-71d8-4359-96d7-0e62e6b9f6e1) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.3ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 2 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.3ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 2 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.5ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:38.942496', '2020-04-14 09:44:38.942496') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:38.949366', '2020-04-14 09:44:38.949366') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 2  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:38.968429', '2020-04-14 09:44:38.968429') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 3  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:38.985646', '2020-04-14 09:44:38.985646') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 4  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:38.997628' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:39.012789' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:39.013765', '2020-04-14 09:44:39.013765', '2020-04-14 09:44:39.013335', '2020-05-12 09:44:39.013353', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b3f032eb-790a-4354-9682-a60dc01ec5a4) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 12ms (ActiveRecord: 2.6ms | Allocations: 4913) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.025765' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:39.034124' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:39.035161', '2020-04-14 09:44:39.035161', '2020-04-14 09:44:39.034724', '2020-05-12 09:44:39.034740', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 87afd9da-82d3-4da1-b799-a9fe0b11a6df) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 7ms (ActiveRecord: 2.0ms | Allocations: 3052) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.043828' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 418)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.050451' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 7.1ms | Allocations: 3314) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.4ms | Allocations: 98) Completed 200 OK in 420ms (Views: 415.4ms | ActiveRecord: 1.3ms | Allocations: 528671)  (0.4ms) ROLLBACK  (0.3ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.481692' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 8ms (ActiveRecord: 2.6ms | Allocations: 2417) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.497594' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 4.8ms | Allocations: 2862) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 12ms (Views: 5.3ms | ActiveRecord: 3.0ms | Allocations: 6832)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.515876' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:44:39.518375' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 515)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.524910' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:39.532917' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:39.534796', '2020-04-14 09:44:39.534796', '2020-04-14 09:44:39.534340', '2020-06-13 09:44:39.534358', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6f9bc94d-f53b-4b9e-9546-ef26c99b6213) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 11ms (ActiveRecord: 3.3ms | Allocations: 4387) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.552530' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.3ms | Allocations: 105) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 9ms (Views: 2.2ms | ActiveRecord: 1.9ms | Allocations: 4816)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:44:39.568263' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.4ms | Allocations: 514)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 22) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 20) Completed 200 OK in 13ms (Views: 1.8ms | ActiveRecord: 1.8ms | Allocations: 9411)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.593320' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 4ms (ActiveRecord: 1.0ms | Allocations: 911)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.606444' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 09:44:39.607647' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 877)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 217)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:39.621262' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:44:39.627884' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.634390' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:44:39.635598' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.8ms | Allocations: 2626)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:44:39.647009' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 512)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:39.654598' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.665808' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 2591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [b034d013-8cf6-4b98-9293-21666564fa8c] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: b034d013-8cf6-4b98-9293-21666564fa8c) from Test(default) enqueued at 2020-04-14T09:44:39Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [b034d013-8cf6-4b98-9293-21666564fa8c] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: b034d013-8cf6-4b98-9293-21666564fa8c) from Test(default) in 3.48ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: b034d013-8cf6-4b98-9293-21666564fa8c) to Test(default) with arguments: #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:39.693542' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: e3157f44-1d0f-40ba-8a82-b2fb1f19924e) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 1.3ms | Allocations: 2532)  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 130)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 126)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:39.744524' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: dc80407c-3124-42b6-a9e1-2792ca7b35ed) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 39ms (Views: 0.5ms | ActiveRecord: 1.3ms | Allocations: 2093)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.757377' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 351)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.763851' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:44:39.778868' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.786463' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 19ms (ActiveRecord: 2.9ms | Allocations: 13663) DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.793329' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:44:39.801142', '2020-04-14 09:44:39.801142') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 09:44:39.807089', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 12ms (ActiveRecord: 2.7ms | Allocations: 7526)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.812208' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 3ms (ActiveRecord: 1.0ms | Allocations: 1249)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.821861' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 0.7ms | Allocations: 434) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 6ms (Views: 2.3ms | ActiveRecord: 1.0ms | Allocations: 4296)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.837219' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 6ms (ActiveRecord: 1.1ms | Allocations: 5491)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.852314' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 4ms (ActiveRecord: 1.2ms | Allocations: 1900)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.864113' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 1596)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.874218' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:44:39.883757' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 8ms (ActiveRecord: 1.7ms | Allocations: 5679)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:39.892913' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:44:39.894745' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 53ms (ActiveRecord: 0.4ms | Allocations: 480)  (0.5ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a] Performing DiscoApp::SynchroniseUsersJob (Job ID: ea55f39f-9f93-4cc9-b9c9-046b067a7a7a) from Test(default) enqueued at 2020-04-14T09:44:39Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a] DiscoApp::User Load (0.5ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a] DiscoApp::User Create (0.5ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 09:44:39.995601', '2020-04-14 09:44:39.995601') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a] DiscoApp::User Update (0.3ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 09:44:39.997467' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a] DiscoApp::User Load (0.3ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a] DiscoApp::User Create (0.3ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 09:44:39.999887', '2020-04-14 09:44:39.999887') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 09:44:40.001336' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [ea55f39f-9f93-4cc9-b9c9-046b067a7a7a] Performed DiscoApp::SynchroniseUsersJob (Job ID: ea55f39f-9f93-4cc9-b9c9-046b067a7a7a) from Test(default) in 21.84ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: ea55f39f-9f93-4cc9-b9c9-046b067a7a7a) to Test(default) with arguments: #> DiscoApp::User Load (0.3ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:40.028898' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:40.028898', '2020-04-14 09:44:40.028898', '2020-04-14 09:44:40.028898', '2020-05-12 09:44:40.028898', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 408841af-ed2b-44ce-a7bd-cdec4c4b2576) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857548 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857548 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.4ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:40.047167' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:40.047167', '2020-04-14 09:44:40.047167', '2020-04-14 09:44:40.047167', '2020-05-12 09:44:40.047167', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6b30e484-831d-4a1d-b0fc-42c5cd5ccd32) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:40.068372' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:40.068372', '2020-04-14 09:44:40.068372', '2020-04-14 09:44:40.068372', '2020-05-12 09:44:40.068372', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 75452a90-59e2-416a-a5c2-93915fafa27f) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:40.079170' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:40.079170', '2020-04-14 09:44:40.079170', '2020-04-14 09:44:40.079170', '2020-05-12 09:44:40.079170', 9999, 28) RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b38380fe-ae3f-40c8-834e-c7a8fae99005) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:40.093154' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:44:40.093154', '2020-04-14 09:44:40.093154', '2020-04-14 09:44:40.093154', '2020-06-13 09:44:40.093154', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 7c419af0-3d17-41d7-bd53-0a3bdbdbf94f) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:44:40.112743' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 09:44:40.112743', '2020-04-14 09:44:40.112743') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 5aae17af-6424-4b35-a198-3cd8da584574) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [fe7e2733-2edd-4433-a605-4407cbb162b6] Performing DiscoApp::SendSubscriptionJob (Job ID: fe7e2733-2edd-4433-a605-4407cbb162b6) from Test(default) enqueued at 2020-04-14T09:44:40Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [fe7e2733-2edd-4433-a605-4407cbb162b6] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [fe7e2733-2edd-4433-a605-4407cbb162b6] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [fe7e2733-2edd-4433-a605-4407cbb162b6] Performed DiscoApp::SendSubscriptionJob (Job ID: fe7e2733-2edd-4433-a605-4407cbb162b6) from Test(default) in 16.93ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: fe7e2733-2edd-4433-a605-4407cbb162b6) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.5ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.4ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: fdf5a429-896f-4254-86b7-a6e2d1709ee9) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 57248df6-8d6f-4071-9326-87b38ab0e4b8) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: c17297b0-050a-447b-b843-82bde6b20db9) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.9ms | Allocations: 125)  (0.5ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.5ms | Allocations: 109) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.3ms | Allocations: 142)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 808facab-8262-444b-b450-b96e36dcd3dc) to Test(default) with arguments: #>, #>, "widget_assets"  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 6d386bde-a07e-46a2-8632-c3b23b753f94) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.5ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.3ms | Allocations: 92)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.8ms | Allocations: 114)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: cae97014-0810-4a50-b385-5cc2432f56c5) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: ebe44047-b484-4396-a965-c2b34b30934a) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.8ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:40.863489' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] Performing DiscoApp::AppUninstalledJob (Job ID: 50f47304-7468-48d5-8b0b-025a7874f3a7) from Test(default) enqueued at 2020-04-14T09:44:40Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:44:40.870143' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] [DiscoApp::SendSubscriptionJob] [0ed922fe-6141-4a64-9bf3-f3d605e530a8] Performing DiscoApp::SendSubscriptionJob (Job ID: 0ed922fe-6141-4a64-9bf3-f3d605e530a8) from Test(default) enqueued at 2020-04-14T09:44:40Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] [DiscoApp::SendSubscriptionJob] [0ed922fe-6141-4a64-9bf3-f3d605e530a8] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] [DiscoApp::SendSubscriptionJob] [0ed922fe-6141-4a64-9bf3-f3d605e530a8] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] [DiscoApp::SendSubscriptionJob] [0ed922fe-6141-4a64-9bf3-f3d605e530a8] Performed DiscoApp::SendSubscriptionJob (Job ID: 0ed922fe-6141-4a64-9bf3-f3d605e530a8) from Test(default) in 18.48ms [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 0ed922fe-6141-4a64-9bf3-f3d605e530a8) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] DiscoApp::Session Destroy (0.4ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:44:40.901162', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:44:40.903506' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [50f47304-7468-48d5-8b0b-025a7874f3a7] Performed DiscoApp::AppUninstalledJob (Job ID: 50f47304-7468-48d5-8b0b-025a7874f3a7) from Test(default) in 36.91ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 50f47304-7468-48d5-8b0b-025a7874f3a7) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:44:40.909585' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] Performing DiscoApp::AppUninstalledJob (Job ID: f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3) from Test(default) enqueued at 2020-04-14T09:44:40Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:44:40.913539' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] [DiscoApp::SendSubscriptionJob] [2b7e8b7d-4f87-4f16-ac93-23d94f60cb09] Performing DiscoApp::SendSubscriptionJob (Job ID: 2b7e8b7d-4f87-4f16-ac93-23d94f60cb09) from Test(default) enqueued at 2020-04-14T09:44:40Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] [DiscoApp::SendSubscriptionJob] [2b7e8b7d-4f87-4f16-ac93-23d94f60cb09] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] [DiscoApp::SendSubscriptionJob] [2b7e8b7d-4f87-4f16-ac93-23d94f60cb09] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] [DiscoApp::SendSubscriptionJob] [2b7e8b7d-4f87-4f16-ac93-23d94f60cb09] Performed DiscoApp::SendSubscriptionJob (Job ID: 2b7e8b7d-4f87-4f16-ac93-23d94f60cb09) from Test(default) in 15.25ms [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 2b7e8b7d-4f87-4f16-ac93-23d94f60cb09) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:44:40.934027', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:44:40.936535' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3] Performed DiscoApp::AppUninstalledJob (Job ID: f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3) from Test(default) in 25.52ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: f0a44ce9-d1f8-45dd-bf26-7ee59f62f0f3) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.3ms | Allocations: 90) Completed 404 Not Found in 4ms (Views: 3.3ms | ActiveRecord: 0.4ms | Allocations: 2009)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 163)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.2ms | Allocations: 376)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 09:44:41.023286' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 09:44:41.026648' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.7ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:44:41.037053', '2020-04-14 09:44:41.037053', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:44:41.042359', '2020-04-14 09:44:41.042359', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 09:44:41.043547', '2020-04-14 09:44:41.043547') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:44:41.047039', '2020-04-14 09:44:41.047039', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:44:41 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [1beac397-fecb-477f-870c-a09b81b05306] Performing ProductsDeleteJob (Job ID: 1beac397-fecb-477f-870c-a09b81b05306) from Test(default) enqueued at 2020-04-14T09:44:41Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [1beac397-fecb-477f-870c-a09b81b05306] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [1beac397-fecb-477f-870c-a09b81b05306] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [1beac397-fecb-477f-870c-a09b81b05306]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [1beac397-fecb-477f-870c-a09b81b05306] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [1beac397-fecb-477f-870c-a09b81b05306]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [1beac397-fecb-477f-870c-a09b81b05306] Performed ProductsDeleteJob (Job ID: 1beac397-fecb-477f-870c-a09b81b05306) from Test(default) in 1.87ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: 1beac397-fecb-477f-870c-a09b81b05306) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.1ms | Allocations: 1714)  (0.3ms) SELECT COUNT(*) FROM "products"  (0.2ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:44:41 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [518c2ccd-0a89-4262-b239-0332dbf41938] Performing ProductsUpdateJob (Job ID: 518c2ccd-0a89-4262-b239-0332dbf41938) from Test(default) enqueued at 2020-04-14T09:44:41Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [518c2ccd-0a89-4262-b239-0332dbf41938] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [518c2ccd-0a89-4262-b239-0332dbf41938] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [518c2ccd-0a89-4262-b239-0332dbf41938]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [518c2ccd-0a89-4262-b239-0332dbf41938] Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:44:41.099388' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [518c2ccd-0a89-4262-b239-0332dbf41938]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [518c2ccd-0a89-4262-b239-0332dbf41938] Performed ProductsUpdateJob (Job ID: 518c2ccd-0a89-4262-b239-0332dbf41938) from Test(default) in 4.25ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: 518c2ccd-0a89-4262-b239-0332dbf41938) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 7ms (Views: 0.2ms | ActiveRecord: 1.2ms | Allocations: 8499) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:44:41 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [6aa37e5c-98f8-4d4d-bfe4-17e749f6702a] Performing ProductsCreateJob (Job ID: 6aa37e5c-98f8-4d4d-bfe4-17e749f6702a) from Test(default) enqueued at 2020-04-14T09:44:41Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [6aa37e5c-98f8-4d4d-bfe4-17e749f6702a] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [6aa37e5c-98f8-4d4d-bfe4-17e749f6702a] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [6aa37e5c-98f8-4d4d-bfe4-17e749f6702a]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [6aa37e5c-98f8-4d4d-bfe4-17e749f6702a] Product Create (0.5ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 09:44:41.112215', '2020-04-14 09:44:41.112215') RETURNING "id" [ActiveJob] [ProductsCreateJob] [6aa37e5c-98f8-4d4d-bfe4-17e749f6702a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [6aa37e5c-98f8-4d4d-bfe4-17e749f6702a] Performed ProductsCreateJob (Job ID: 6aa37e5c-98f8-4d4d-bfe4-17e749f6702a) from Test(default) in 6.35ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 6aa37e5c-98f8-4d4d-bfe4-17e749f6702a) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 1.5ms | Allocations: 12383) Product Load (0.5ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:44:41.125396' WHERE "products"."id" = 632910393  (0.1ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:44:41 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [cb121811-d742-4637-8238-1f428bdac87a] Performing CartsUpdateJob (Job ID: cb121811-d742-4637-8238-1f428bdac87a) from Test(default) enqueued at 2020-04-14T09:44:41Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [cb121811-d742-4637-8238-1f428bdac87a] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [cb121811-d742-4637-8238-1f428bdac87a] Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [cb121811-d742-4637-8238-1f428bdac87a]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [cb121811-d742-4637-8238-1f428bdac87a] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 09:44:41.139377' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [cb121811-d742-4637-8238-1f428bdac87a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [cb121811-d742-4637-8238-1f428bdac87a] Performed CartsUpdateJob (Job ID: cb121811-d742-4637-8238-1f428bdac87a) from Test(default) in 6.29ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: cb121811-d742-4637-8238-1f428bdac87a) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.2ms | ActiveRecord: 1.2ms | Allocations: 6342) Cart Load (0.2ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:41.146362', '2020-04-14 09:44:41.146362') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 8d0ebe2b-7b50-459c-8805-69af0eaee0d8) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:44:41.150876', '2020-04-14 09:44:41.150876') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 3ec2aaf8-e528-4b46-9115-e97a6ce6cb19) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 6 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 6 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:41.157836', '2020-04-14 09:44:41.157836') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 3  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:41.163465', '2020-04-14 09:44:41.163465') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 4  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 4  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:41.169602', '2020-04-14 09:44:41.169602') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 5  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:44:41.173257', '2020-04-14 09:44:41.173257') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 6  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:44:41.179803' WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.6ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 09:44:41.190718', '2020-04-14 09:44:41.190718') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:44:41.206082' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:44:41.220250' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:44:41.236806', '2020-04-14 09:44:41.236806') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:44:41.257875' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:44:41.274066' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:41.295384' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:41.299399' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 48d1d5c4-5690-442c-8702-24393142a463) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.0ms | Allocations: 1929) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 343)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:44:41.305853' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 625)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:44:41.313636' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 188673b2-995b-488c-a734-410019b3f743) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.0ms | Allocations: 1877) DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:44:41.319021' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:44:41.324971' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.2ms | Allocations: 83) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.3ms | Allocations: 3034)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [2be482f8-7792-493b-95a1-27f3a8f54b7f] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 2be482f8-7792-493b-95a1-27f3a8f54b7f) from Test(default) enqueued at 2020-04-14T09:44:41Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [2be482f8-7792-493b-95a1-27f3a8f54b7f] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 2be482f8-7792-493b-95a1-27f3a8f54b7f) from Test(default) in 16.63ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 2be482f8-7792-493b-95a1-27f3a8f54b7f) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [e1da588d-a2c7-4bff-a151-ab664703e9cc] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: e1da588d-a2c7-4bff-a151-ab664703e9cc) from Test(default) enqueued at 2020-04-14T09:44:41Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [e1da588d-a2c7-4bff-a151-ab664703e9cc] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: e1da588d-a2c7-4bff-a151-ab664703e9cc) from Test(default) in 10.93ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: e1da588d-a2c7-4bff-a151-ab664703e9cc) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 173)  (0.2ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 358)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.2ms) ROLLBACK  (0.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.2ms) BEGIN  (1.5ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.5ms) COMMIT  (0.2ms) BEGIN Fixtures Load (4.6ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 09:49:58.224167', '2020-04-14 09:49:58.224167'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 09:49:58.235212', '2020-04-14 09:49:58.235212', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 09:49:58.235212', '2020-04-14 09:49:58.235212', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 09:49:58.246993', '2020-04-14 09:49:58.246993', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 09:49:58.246993', '2020-04-14 09:49:58.246993', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 09:49:58.253853', '2020-04-14 09:49:58.253853', DEFAULT, DEFAULT, '2020-04-07 09:49:58', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 09:49:58.253853', '2020-04-14 09:49:58.253853', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 09:49:58.260044', '2020-04-14 09:49:58.260044'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 09:49:58.265366', '2020-04-14 09:49:58.265366', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 09:49:58.273334', '2020-04-14 09:49:58.273334', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 09:49:58.273334', '2020-04-14 09:49:58.273334', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 09:49:58.273334', '2020-04-14 09:49:58.273334', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 09:49:58.273334', '2020-04-14 09:49:58.273334', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 09:49:58.273334', '2020-04-14 09:49:58.273334', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 09:49:58.273334', '2020-04-14 09:49:58.273334', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 09:49:58.285873', '2020-04-14 09:49:58.285873'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.4ms) COMMIT  (0.1ms) BEGIN  (1.3ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.9ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:49:58.461973', '2020-04-14 09:49:58.461973') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 2ec11ba4-f0c1-4fe8-929b-f3d5bedc2212) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (1.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (1.1ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 7 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.7ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 7 LIMIT 1  (0.4ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:49:58.480914', '2020-04-14 09:49:58.480914') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: fba9b4ba-6aa7-493a-a3a0-571d8318fc7a) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 3ms (ActiveRecord: 0.0ms | Allocations: 1341)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:49:58.522492' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: e99367fa-4dc4-4287-8757-b071294a6234) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 5) Completed 200 OK in 14ms (Views: 4.5ms | ActiveRecord: 2.9ms | Allocations: 4322)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.4ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:49:58.561604' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 39c1faee-eeac-486c-a28a-e6c829cb2edc) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 30ms (Views: 0.3ms | ActiveRecord: 1.8ms | Allocations: 2103)  (0.3ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:58.592492' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:49:58.611151' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 14ms (ActiveRecord: 2.4ms | Allocations: 8735)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:58.618818' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 7ms (ActiveRecord: 1.5ms | Allocations: 5493)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:58.635259' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 4.1ms | Allocations: 954) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.8ms | Allocations: 98) Completed 200 OK in 527ms (Views: 520.4ms | ActiveRecord: 1.2ms | Allocations: 526102)  (0.6ms) ROLLBACK  (0.3ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.172248' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 415)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.179540' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:49:59.192140' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.7ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.198635' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 17ms (ActiveRecord: 4.1ms | Allocations: 12048) DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.205711' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:49:59.213813', '2020-04-14 09:49:59.213813') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 09:49:59.225749', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 17ms (ActiveRecord: 2.6ms | Allocations: 14288)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.231273' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.9ms | Allocations: 1596)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.244061' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:49:59.245831' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.4ms | Allocations: 516)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.254703' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 3ms (ActiveRecord: 1.0ms | Allocations: 1249)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.263372' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 6ms (ActiveRecord: 2.2ms | Allocations: 1900)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.5ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:49:59.305855', '2020-04-14 09:49:59.305855') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 7  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:49:59.499433', '2020-04-14 09:49:59.499433') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 8  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.7ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:49:59.505752', '2020-04-14 09:49:59.505752') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 9  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:49:59.512110', '2020-04-14 09:49:59.512110') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 10  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 09:49:59.536072' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 09:49:59.539413' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 09:49:59.553133', '2020-04-14 09:49:59.553133') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:49:59.566198' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:49:59.586315' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.5ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:49:59.651074' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 09:49:59.663774' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.3ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 09:49:59.687352', '2020-04-14 09:49:59.687352') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:49:59.731063' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.771328' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.8ms | Allocations: 853)  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:49:59.780262' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.7ms | Allocations: 90) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 6ms (Views: 3.4ms | ActiveRecord: 0.6ms | Allocations: 3223)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:49:59.794907' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 32f65b25-df11-4d1b-bce8-11147c934ce5) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 6ms (ActiveRecord: 1.3ms | Allocations: 2411) DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:49:59.800828' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 479)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:49:59.807599' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:49:59.811533' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: aa299107-6b98-41d7-8f43-855db3aa4679) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.2ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.2ms | Allocations: 376)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed] Performing DiscoApp::SynchroniseUsersJob (Job ID: 7b1d2c84-3f32-4bec-9efd-a304d2be4aed) from Test(default) enqueued at 2020-04-14T09:49:59Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed] DiscoApp::User Load (0.5ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 09:49:59.873428', '2020-04-14 09:49:59.873428') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed] DiscoApp::User Update (0.3ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 09:49:59.874863' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 09:49:59.877082', '2020-04-14 09:49:59.877082') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 09:49:59.878133' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7b1d2c84-3f32-4bec-9efd-a304d2be4aed] Performed DiscoApp::SynchroniseUsersJob (Job ID: 7b1d2c84-3f32-4bec-9efd-a304d2be4aed) from Test(default) in 33.76ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: 7b1d2c84-3f32-4bec-9efd-a304d2be4aed) to Test(default) with arguments: #> DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.5ms | Allocations: 111) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.4ms | Allocations: 150)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: bc31726a-8dee-432a-b1d8-27177bfb4e1b) to Test(default) with arguments: #>, #>, "widget_assets"  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.4ms | Allocations: 114)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.4ms | Allocations: 92)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.4ms | Allocations: 115)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 2c287942-04ec-46b4-a4d9-98d0a848df36) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 97e40be0-9850-42fd-b155-0c62864d68b9) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: acb421fe-2c72-4d47-8fd9-fb0d76c22d2a) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 800d4a2f-4f36-483f-b5eb-a8b8964b6da7) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.4ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.6ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.7ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.4ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: d97fdfc9-dfcc-42a6-83da-5f04693e5e31) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.3ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 15178239-fb96-4cfb-a54c-d232717c98da) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:50:00.756140', '2020-04-14 09:50:00.756140') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 9  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 9  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:50:00.766392', '2020-04-14 09:50:00.766392') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 10  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:50:00.771612', '2020-04-14 09:50:00.771612') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 11  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 09:50:00.777016', '2020-04-14 09:50:00.777016') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 12  (0.7ms) RELEASE SAVEPOINT active_record_1  (1.3ms) ROLLBACK  (0.7ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.3ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.5ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:50:00 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [51fe74d5-13d1-4450-a87a-fa97587e1794] Performing ProductsCreateJob (Job ID: 51fe74d5-13d1-4450-a87a-fa97587e1794) from Test(default) enqueued at 2020-04-14T09:50:00Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [51fe74d5-13d1-4450-a87a-fa97587e1794] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [51fe74d5-13d1-4450-a87a-fa97587e1794] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [51fe74d5-13d1-4450-a87a-fa97587e1794]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [51fe74d5-13d1-4450-a87a-fa97587e1794] Product Create (0.6ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 09:50:00.859158', '2020-04-14 09:50:00.859158') RETURNING "id" [ActiveJob] [ProductsCreateJob] [51fe74d5-13d1-4450-a87a-fa97587e1794]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [51fe74d5-13d1-4450-a87a-fa97587e1794] Performed ProductsCreateJob (Job ID: 51fe74d5-13d1-4450-a87a-fa97587e1794) from Test(default) in 8.99ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 51fe74d5-13d1-4450-a87a-fa97587e1794) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 15ms (Views: 0.4ms | ActiveRecord: 2.0ms | Allocations: 12458) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.5ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Product Update (0.7ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:50:00.875415' WHERE "products"."id" = 632910393  (0.3ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:50:00 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97] Performing CartsUpdateJob (Job ID: bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97) from Test(default) enqueued at 2020-04-14T09:50:00Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97] Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97] Cart Update (0.4ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 09:50:00.894149' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97] Performed CartsUpdateJob (Job ID: bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97) from Test(default) in 7.31ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: bfc3dab3-bd0b-4e7d-943e-ce4095dd7c97) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.5ms | Allocations: 6342) Cart Load (0.4ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:50:00 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [b8bc0d33-a04e-4c45-aff1-33c0368d50b5] Performing ProductsUpdateJob (Job ID: b8bc0d33-a04e-4c45-aff1-33c0368d50b5) from Test(default) enqueued at 2020-04-14T09:50:00Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [b8bc0d33-a04e-4c45-aff1-33c0368d50b5] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [b8bc0d33-a04e-4c45-aff1-33c0368d50b5] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [b8bc0d33-a04e-4c45-aff1-33c0368d50b5]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [b8bc0d33-a04e-4c45-aff1-33c0368d50b5] Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 09:50:00.908920' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [b8bc0d33-a04e-4c45-aff1-33c0368d50b5]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [b8bc0d33-a04e-4c45-aff1-33c0368d50b5] Performed ProductsUpdateJob (Job ID: b8bc0d33-a04e-4c45-aff1-33c0368d50b5) from Test(default) in 5.98ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: b8bc0d33-a04e-4c45-aff1-33c0368d50b5) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 1.5ms | Allocations: 8449) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 17:50:00 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [46ea3ef7-b1dc-4332-88fd-8c05aecdf548] Performing ProductsDeleteJob (Job ID: 46ea3ef7-b1dc-4332-88fd-8c05aecdf548) from Test(default) enqueued at 2020-04-14T09:50:00Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [46ea3ef7-b1dc-4332-88fd-8c05aecdf548] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [46ea3ef7-b1dc-4332-88fd-8c05aecdf548] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [46ea3ef7-b1dc-4332-88fd-8c05aecdf548]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [46ea3ef7-b1dc-4332-88fd-8c05aecdf548] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [46ea3ef7-b1dc-4332-88fd-8c05aecdf548]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [46ea3ef7-b1dc-4332-88fd-8c05aecdf548] Performed ProductsDeleteJob (Job ID: 46ea3ef7-b1dc-4332-88fd-8c05aecdf548) from Test(default) in 2.99ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: 46ea3ef7-b1dc-4332-88fd-8c05aecdf548) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 1.5ms | Allocations: 1710)  (0.3ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [0000d74c-3cf1-43ed-9829-777f2019a9fa] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 0000d74c-3cf1-43ed-9829-777f2019a9fa) from Test(default) enqueued at 2020-04-14T09:50:00Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [0000d74c-3cf1-43ed-9829-777f2019a9fa] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 0000d74c-3cf1-43ed-9829-777f2019a9fa) from Test(default) in 17.31ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 0000d74c-3cf1-43ed-9829-777f2019a9fa) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [06471a4e-9c8f-4a97-abd1-5449070cc8f0] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 06471a4e-9c8f-4a97-abd1-5449070cc8f0) from Test(default) enqueued at 2020-04-14T09:50:00Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [06471a4e-9c8f-4a97-abd1-5449070cc8f0] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 06471a4e-9c8f-4a97-abd1-5449070cc8f0) from Test(default) in 21.75ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 06471a4e-9c8f-4a97-abd1-5449070cc8f0) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 171)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.2ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 357)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:01.017503' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 6ms (ActiveRecord: 1.8ms | Allocations: 2577) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:01.031366' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:01.042144' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:50:01.044513', '2020-04-14 09:50:01.044513', '2020-04-14 09:50:01.042817', '2020-05-12 09:50:01.042842', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 4889a631-34a8-48ec-b123-7551641639a0) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 13ms (ActiveRecord: 2.4ms | Allocations: 4484) DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:01.057847' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 8.6ms | Allocations: 3075) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 14) Completed 200 OK in 14ms (Views: 10.1ms | ActiveRecord: 1.5ms | Allocations: 6362)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:01.080266' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 221)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:01.086711' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:01.096845' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:50:01.104886', '2020-04-14 09:50:01.104886', '2020-04-14 09:50:01.104379', '2020-06-13 09:50:01.104399', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 13b2d7ea-2dab-4202-af76-8c370070af0d) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 19ms (ActiveRecord: 4.2ms | Allocations: 9119) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:01.115001' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 5.4ms | Allocations: 2854) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 12ms (Views: 5.9ms | ActiveRecord: 2.8ms | Allocations: 6824)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:01.132618' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 09:50:01.134569' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 479)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:01.141117' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:01.149110' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:50:01.150080', '2020-04-14 09:50:01.150080', '2020-04-14 09:50:01.149654', '2020-05-12 09:50:01.149667', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 99ca5e97-e326-407f-b4f4-367dd67fe2ab) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 10ms (ActiveRecord: 2.6ms | Allocations: 4102) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.5ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:50:01.165528', '2020-04-14 09:50:01.165528', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:50:01.170312', '2020-04-14 09:50:01.170312', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 09:50:01.171532', '2020-04-14 09:50:01.171532') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 09:50:01.175272', '2020-04-14 09:50:01.175272', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:50:01.180591', '2020-04-14 09:50:01.180591') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 92f508db-eb67-44a0-ace8-70e4da9004f0) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 11 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 11 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 09:50:01.187551', '2020-04-14 09:50:01.187551') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 23e66a9b-6336-44d7-81b4-762ebd3ab57e) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [81e9dfdf-149e-4a81-bded-f16a977a0566] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 81e9dfdf-149e-4a81-bded-f16a977a0566) from Test(default) enqueued at 2020-04-14T09:50:01Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [81e9dfdf-149e-4a81-bded-f16a977a0566] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 81e9dfdf-149e-4a81-bded-f16a977a0566) from Test(default) in 4.61ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: 81e9dfdf-149e-4a81-bded-f16a977a0566) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.7ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:50:01.891774' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] Performing DiscoApp::AppUninstalledJob (Job ID: 8868da27-1b21-4263-9536-c0e48d81574a) from Test(default) enqueued at 2020-04-14T09:50:01Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:50:01.897270' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] [DiscoApp::SendSubscriptionJob] [f1529f01-0fc4-4658-81cb-aa19d6c7a15f] Performing DiscoApp::SendSubscriptionJob (Job ID: f1529f01-0fc4-4658-81cb-aa19d6c7a15f) from Test(default) enqueued at 2020-04-14T09:50:01Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] [DiscoApp::SendSubscriptionJob] [f1529f01-0fc4-4658-81cb-aa19d6c7a15f] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] [DiscoApp::SendSubscriptionJob] [f1529f01-0fc4-4658-81cb-aa19d6c7a15f] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] [DiscoApp::SendSubscriptionJob] [f1529f01-0fc4-4658-81cb-aa19d6c7a15f] Performed DiscoApp::SendSubscriptionJob (Job ID: f1529f01-0fc4-4658-81cb-aa19d6c7a15f) from Test(default) in 16.94ms [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] Enqueued DiscoApp::SendSubscriptionJob (Job ID: f1529f01-0fc4-4658-81cb-aa19d6c7a15f) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:50:01.920975', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:50:01.923991' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8868da27-1b21-4263-9536-c0e48d81574a] Performed DiscoApp::AppUninstalledJob (Job ID: 8868da27-1b21-4263-9536-c0e48d81574a) from Test(default) in 29.93ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 8868da27-1b21-4263-9536-c0e48d81574a) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:50:01.930194' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] Performing DiscoApp::AppUninstalledJob (Job ID: 6e64d38d-c55d-4eba-a63f-63b6eef58351) from Test(default) enqueued at 2020-04-14T09:50:01Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:50:01.934016' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] [DiscoApp::SendSubscriptionJob] [2f9e6852-31f6-4268-add3-d75838c73ba6] Performing DiscoApp::SendSubscriptionJob (Job ID: 2f9e6852-31f6-4268-add3-d75838c73ba6) from Test(default) enqueued at 2020-04-14T09:50:01Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] [DiscoApp::SendSubscriptionJob] [2f9e6852-31f6-4268-add3-d75838c73ba6] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] [DiscoApp::SendSubscriptionJob] [2f9e6852-31f6-4268-add3-d75838c73ba6] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] [DiscoApp::SendSubscriptionJob] [2f9e6852-31f6-4268-add3-d75838c73ba6] Performed DiscoApp::SendSubscriptionJob (Job ID: 2f9e6852-31f6-4268-add3-d75838c73ba6) from Test(default) in 15.45ms [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 2f9e6852-31f6-4268-add3-d75838c73ba6) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 09:50:01.954771', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:50:01.957149' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [6e64d38d-c55d-4eba-a63f-63b6eef58351] Performed DiscoApp::AppUninstalledJob (Job ID: 6e64d38d-c55d-4eba-a63f-63b6eef58351) from Test(default) in 25.67ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 6e64d38d-c55d-4eba-a63f-63b6eef58351) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 227)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.3ms | Allocations: 530)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.6ms | Allocations: 85) Completed 404 Not Found in 4ms (Views: 2.9ms | ActiveRecord: 0.2ms | Allocations: 1794)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.7ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:50:01.995338' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] Performing DiscoApp::AppInstalledJob (Job ID: 69cf4ccf-113a-4476-9bb9-cb6a1208710f) from Test(default) enqueued at 2020-04-14T09:50:01Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:50:01.999467' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SynchroniseWebhooksJob] [6c8b507e-a6de-4351-9259-477c229d72cd] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 6c8b507e-a6de-4351-9259-477c229d72cd) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SynchroniseWebhooksJob] [6c8b507e-a6de-4351-9259-477c229d72cd] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 6c8b507e-a6de-4351-9259-477c229d72cd) from Test(default) in 65.55ms [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SynchroniseCarrierServiceJob] [cb77a855-efe1-4a6a-a7b3-fe6f02e8ea4d] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: cb77a855-efe1-4a6a-a7b3-fe6f02e8ea4d) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SynchroniseCarrierServiceJob] [cb77a855-efe1-4a6a-a7b3-fe6f02e8ea4d] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: cb77a855-efe1-4a6a-a7b3-fe6f02e8ea4d) from Test(default) in 3.94ms [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::ShopUpdateJob] [5b559f06-4896-43e3-9136-cff47c87e33a] Performing DiscoApp::ShopUpdateJob (Job ID: 5b559f06-4896-43e3-9136-cff47c87e33a) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::ShopUpdateJob] [5b559f06-4896-43e3-9136-cff47c87e33a]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::ShopUpdateJob] [5b559f06-4896-43e3-9136-cff47c87e33a] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::ShopUpdateJob] [5b559f06-4896-43e3-9136-cff47c87e33a] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::ShopUpdateJob] [5b559f06-4896-43e3-9136-cff47c87e33a]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::ShopUpdateJob] [5b559f06-4896-43e3-9136-cff47c87e33a] Performed DiscoApp::ShopUpdateJob (Job ID: 5b559f06-4896-43e3-9136-cff47c87e33a) from Test(default) in 6.65ms [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:02.081053' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 09:50:02.086158', '2020-04-14 09:50:02.086158', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857545 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SubscriptionChangedJob] [17726109-aeff-4622-8226-b8668f4212fa] Performing DiscoApp::SubscriptionChangedJob (Job ID: 17726109-aeff-4622-8226-b8668f4212fa) from Test(default) enqueued at 2020-04-14T09:50:02Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SubscriptionChangedJob] [17726109-aeff-4622-8226-b8668f4212fa] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SubscriptionChangedJob] [17726109-aeff-4622-8226-b8668f4212fa] [DiscoApp::SendSubscriptionJob] [3822192f-e252-4076-94b2-627cd4abbabc] Performing DiscoApp::SendSubscriptionJob (Job ID: 3822192f-e252-4076-94b2-627cd4abbabc) from Test(default) enqueued at 2020-04-14T09:50:02Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SubscriptionChangedJob] [17726109-aeff-4622-8226-b8668f4212fa] [DiscoApp::SendSubscriptionJob] [3822192f-e252-4076-94b2-627cd4abbabc] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SubscriptionChangedJob] [17726109-aeff-4622-8226-b8668f4212fa] [DiscoApp::SendSubscriptionJob] [3822192f-e252-4076-94b2-627cd4abbabc] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SubscriptionChangedJob] [17726109-aeff-4622-8226-b8668f4212fa] [DiscoApp::SendSubscriptionJob] [3822192f-e252-4076-94b2-627cd4abbabc] Performed DiscoApp::SendSubscriptionJob (Job ID: 3822192f-e252-4076-94b2-627cd4abbabc) from Test(default) in 13.59ms [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SubscriptionChangedJob] [17726109-aeff-4622-8226-b8668f4212fa] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 3822192f-e252-4076-94b2-627cd4abbabc) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] [DiscoApp::SubscriptionChangedJob] [17726109-aeff-4622-8226-b8668f4212fa] Performed DiscoApp::SubscriptionChangedJob (Job ID: 17726109-aeff-4622-8226-b8668f4212fa) from Test(default) in 14.9ms [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 17726109-aeff-4622-8226-b8668f4212fa) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:02.106030' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [69cf4ccf-113a-4476-9bb9-cb6a1208710f] Performed DiscoApp::AppInstalledJob (Job ID: 69cf4ccf-113a-4476-9bb9-cb6a1208710f) from Test(default) in 109.11ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 69cf4ccf-113a-4476-9bb9-cb6a1208710f) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:50:02.117159' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] Performing DiscoApp::AppInstalledJob (Job ID: 4a429bc0-3119-48ca-b66e-79aa25a6d649) from Test(default) enqueued at 2020-04-14T09:50:02Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:50:02.120356' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SynchroniseWebhooksJob] [890c0b0c-b1f3-44c4-8eed-fe4862b4d567] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 890c0b0c-b1f3-44c4-8eed-fe4862b4d567) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SynchroniseWebhooksJob] [890c0b0c-b1f3-44c4-8eed-fe4862b4d567] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 890c0b0c-b1f3-44c4-8eed-fe4862b4d567) from Test(default) in 13.24ms [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SynchroniseCarrierServiceJob] [7e1c66ce-c7be-422c-b771-4452134f2bbe] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7e1c66ce-c7be-422c-b771-4452134f2bbe) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SynchroniseCarrierServiceJob] [7e1c66ce-c7be-422c-b771-4452134f2bbe] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7e1c66ce-c7be-422c-b771-4452134f2bbe) from Test(default) in 3.51ms [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::ShopUpdateJob] [c009361f-fedb-4473-bf27-e806b87a4b05] Performing DiscoApp::ShopUpdateJob (Job ID: c009361f-fedb-4473-bf27-e806b87a4b05) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::ShopUpdateJob] [c009361f-fedb-4473-bf27-e806b87a4b05]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::ShopUpdateJob] [c009361f-fedb-4473-bf27-e806b87a4b05] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::ShopUpdateJob] [c009361f-fedb-4473-bf27-e806b87a4b05] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::ShopUpdateJob] [c009361f-fedb-4473-bf27-e806b87a4b05]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::ShopUpdateJob] [c009361f-fedb-4473-bf27-e806b87a4b05] Performed DiscoApp::ShopUpdateJob (Job ID: c009361f-fedb-4473-bf27-e806b87a4b05) from Test(default) in 5.4ms [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:02.145984' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:50:02.147045', '2020-04-14 09:50:02.147045') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857546 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SubscriptionChangedJob] [285ed466-1044-4f92-91b1-198f9120371b] Performing DiscoApp::SubscriptionChangedJob (Job ID: 285ed466-1044-4f92-91b1-198f9120371b) from Test(default) enqueued at 2020-04-14T09:50:02Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SubscriptionChangedJob] [285ed466-1044-4f92-91b1-198f9120371b] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SubscriptionChangedJob] [285ed466-1044-4f92-91b1-198f9120371b] [DiscoApp::SendSubscriptionJob] [e84ef487-79cc-4744-bba1-a7fc51cd5824] Performing DiscoApp::SendSubscriptionJob (Job ID: e84ef487-79cc-4744-bba1-a7fc51cd5824) from Test(default) enqueued at 2020-04-14T09:50:02Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SubscriptionChangedJob] [285ed466-1044-4f92-91b1-198f9120371b] [DiscoApp::SendSubscriptionJob] [e84ef487-79cc-4744-bba1-a7fc51cd5824] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SubscriptionChangedJob] [285ed466-1044-4f92-91b1-198f9120371b] [DiscoApp::SendSubscriptionJob] [e84ef487-79cc-4744-bba1-a7fc51cd5824] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SubscriptionChangedJob] [285ed466-1044-4f92-91b1-198f9120371b] [DiscoApp::SendSubscriptionJob] [e84ef487-79cc-4744-bba1-a7fc51cd5824] Performed DiscoApp::SendSubscriptionJob (Job ID: e84ef487-79cc-4744-bba1-a7fc51cd5824) from Test(default) in 13.06ms [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SubscriptionChangedJob] [285ed466-1044-4f92-91b1-198f9120371b] Enqueued DiscoApp::SendSubscriptionJob (Job ID: e84ef487-79cc-4744-bba1-a7fc51cd5824) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] [DiscoApp::SubscriptionChangedJob] [285ed466-1044-4f92-91b1-198f9120371b] Performed DiscoApp::SubscriptionChangedJob (Job ID: 285ed466-1044-4f92-91b1-198f9120371b) from Test(default) in 14.43ms [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 285ed466-1044-4f92-91b1-198f9120371b) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:02.166743' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [4a429bc0-3119-48ca-b66e-79aa25a6d649] Performed DiscoApp::AppInstalledJob (Job ID: 4a429bc0-3119-48ca-b66e-79aa25a6d649) from Test(default) in 49.39ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 4a429bc0-3119-48ca-b66e-79aa25a6d649) to Test(default) with arguments: #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:50:02.178029' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] Performing DiscoApp::AppInstalledJob (Job ID: 0c32730f-e8fa-4c72-a387-0bb0c733d2c6) from Test(default) enqueued at 2020-04-14T09:50:02Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:50:02.182036' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SynchroniseWebhooksJob] [ecbd4e85-7bd7-4ae9-a6e1-a22a88a42273] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: ecbd4e85-7bd7-4ae9-a6e1-a22a88a42273) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SynchroniseWebhooksJob] [ecbd4e85-7bd7-4ae9-a6e1-a22a88a42273] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: ecbd4e85-7bd7-4ae9-a6e1-a22a88a42273) from Test(default) in 13.76ms [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SynchroniseCarrierServiceJob] [2150bb31-4c0c-493f-aad2-a950643c45e2] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 2150bb31-4c0c-493f-aad2-a950643c45e2) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SynchroniseCarrierServiceJob] [2150bb31-4c0c-493f-aad2-a950643c45e2] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 2150bb31-4c0c-493f-aad2-a950643c45e2) from Test(default) in 3.12ms [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::ShopUpdateJob] [2a7b6962-2cce-4465-b1cd-68d81042541a] Performing DiscoApp::ShopUpdateJob (Job ID: 2a7b6962-2cce-4465-b1cd-68d81042541a) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::ShopUpdateJob] [2a7b6962-2cce-4465-b1cd-68d81042541a]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::ShopUpdateJob] [2a7b6962-2cce-4465-b1cd-68d81042541a] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::ShopUpdateJob] [2a7b6962-2cce-4465-b1cd-68d81042541a] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::ShopUpdateJob] [2a7b6962-2cce-4465-b1cd-68d81042541a]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::ShopUpdateJob] [2a7b6962-2cce-4465-b1cd-68d81042541a] Performed DiscoApp::ShopUpdateJob (Job ID: 2a7b6962-2cce-4465-b1cd-68d81042541a) from Test(default) in 6.12ms [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:02.208996' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 09:50:02.210004', '2020-04-14 09:50:02.210004') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857547 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SubscriptionChangedJob] [6d59ddc6-212f-4892-a701-5cb066a7c4a8] Performing DiscoApp::SubscriptionChangedJob (Job ID: 6d59ddc6-212f-4892-a701-5cb066a7c4a8) from Test(default) enqueued at 2020-04-14T09:50:02Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SubscriptionChangedJob] [6d59ddc6-212f-4892-a701-5cb066a7c4a8] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SubscriptionChangedJob] [6d59ddc6-212f-4892-a701-5cb066a7c4a8] [DiscoApp::SendSubscriptionJob] [fa1385cb-8be9-43b4-9ea9-7078d7af365c] Performing DiscoApp::SendSubscriptionJob (Job ID: fa1385cb-8be9-43b4-9ea9-7078d7af365c) from Test(default) enqueued at 2020-04-14T09:50:02Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SubscriptionChangedJob] [6d59ddc6-212f-4892-a701-5cb066a7c4a8] [DiscoApp::SendSubscriptionJob] [fa1385cb-8be9-43b4-9ea9-7078d7af365c] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SubscriptionChangedJob] [6d59ddc6-212f-4892-a701-5cb066a7c4a8] [DiscoApp::SendSubscriptionJob] [fa1385cb-8be9-43b4-9ea9-7078d7af365c] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SubscriptionChangedJob] [6d59ddc6-212f-4892-a701-5cb066a7c4a8] [DiscoApp::SendSubscriptionJob] [fa1385cb-8be9-43b4-9ea9-7078d7af365c] Performed DiscoApp::SendSubscriptionJob (Job ID: fa1385cb-8be9-43b4-9ea9-7078d7af365c) from Test(default) in 13.81ms [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SubscriptionChangedJob] [6d59ddc6-212f-4892-a701-5cb066a7c4a8] Enqueued DiscoApp::SendSubscriptionJob (Job ID: fa1385cb-8be9-43b4-9ea9-7078d7af365c) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] [DiscoApp::SubscriptionChangedJob] [6d59ddc6-212f-4892-a701-5cb066a7c4a8] Performed DiscoApp::SubscriptionChangedJob (Job ID: 6d59ddc6-212f-4892-a701-5cb066a7c4a8) from Test(default) in 15.16ms [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6d59ddc6-212f-4892-a701-5cb066a7c4a8) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:02.230273' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [0c32730f-e8fa-4c72-a387-0bb0c733d2c6] Performed DiscoApp::AppInstalledJob (Job ID: 0c32730f-e8fa-4c72-a387-0bb0c733d2c6) from Test(default) in 51.39ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 0c32730f-e8fa-4c72-a387-0bb0c733d2c6) to Test(default) with arguments: #> DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 09:50:02.246689' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 617)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:02.254310' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 7ms (ActiveRecord: 2.3ms | Allocations: 2627)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:02.268018' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 911)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 09:50:02.279109' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 09:50:02.287318' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:02.295725' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 09:50:02.296960' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.9ms | Allocations: 877)  (0.3ms) ROLLBACK  (0.3ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 09:50:02.308275' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.6ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 09:50:02.324386' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 1.0ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.5ms | Allocations: 119) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 21) Completed 200 OK in 13ms (Views: 2.6ms | ActiveRecord: 3.3ms | Allocations: 5046)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:02.353266' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 13) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 10ms (Views: 1.5ms | ActiveRecord: 2.9ms | Allocations: 4297)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 217)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 09:50:02.375353' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 09:50:02.376556' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 7ms (ActiveRecord: 2.2ms | Allocations: 2591)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:02.388221' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:50:02.388221', '2020-04-14 09:50:02.388221', '2020-04-14 09:50:02.388221', '2020-05-12 09:50:02.388221', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: cc266845-0f91-4259-87b5-276f16aee364) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857548 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857548 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:02.398973' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:50:02.398973', '2020-04-14 09:50:02.398973', '2020-04-14 09:50:02.398973', '2020-06-13 09:50:02.398973', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 60cd4523-c7df-4451-807a-03e2444faae4) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:02.408722' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:50:02.408722', '2020-04-14 09:50:02.408722', '2020-04-14 09:50:02.408722', '2020-05-12 09:50:02.408722', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 4114cc57-f021-444f-bf56-7420eeff0fc5) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:02.419957' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 09:50:02.419957', '2020-04-14 09:50:02.419957') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b42d8730-afd4-4b03-a613-33bc8bfe782f) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:02.426029' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:50:02.426029', '2020-04-14 09:50:02.426029', '2020-04-14 09:50:02.426029', '2020-05-12 09:50:02.426029', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 7d2fd21e-d24b-4252-826a-687df5c977b4) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 09:50:02.433363' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 09:50:02.433363', '2020-04-14 09:50:02.433363', '2020-04-14 09:50:02.433363', '2020-05-12 09:50:02.433363', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: bf74bf71-0b5d-4d09-8dd3-567107f7ed43) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [a37afcfb-5de1-4439-8280-0102a48d2d1d] Performing DiscoApp::SendSubscriptionJob (Job ID: a37afcfb-5de1-4439-8280-0102a48d2d1d) from Test(default) enqueued at 2020-04-14T09:50:02Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [a37afcfb-5de1-4439-8280-0102a48d2d1d] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [a37afcfb-5de1-4439-8280-0102a48d2d1d] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [a37afcfb-5de1-4439-8280-0102a48d2d1d] Performed DiscoApp::SendSubscriptionJob (Job ID: a37afcfb-5de1-4439-8280-0102a48d2d1d) from Test(default) in 13.82ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: a37afcfb-5de1-4439-8280-0102a48d2d1d) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (1.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.1ms) BEGIN  (1.1ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (1.7ms) COMMIT  (0.1ms) BEGIN Fixtures Load (4.8ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 11:53:32.967258', '2020-04-14 11:53:32.967258'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 11:53:32.974353', '2020-04-14 11:53:32.974353', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 11:53:32.974353', '2020-04-14 11:53:32.974353', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 11:53:32.979564', '2020-04-14 11:53:32.979564', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 11:53:32.979564', '2020-04-14 11:53:32.979564', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 11:53:32.982146', '2020-04-14 11:53:32.982146', DEFAULT, DEFAULT, '2020-04-07 11:53:32', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 11:53:32.982146', '2020-04-14 11:53:32.982146', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 11:53:32.984948', '2020-04-14 11:53:32.984948'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 11:53:32.987202', '2020-04-14 11:53:32.987202', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 11:53:32.989810', '2020-04-14 11:53:32.989810', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 11:53:32.989810', '2020-04-14 11:53:32.989810', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 11:53:32.989810', '2020-04-14 11:53:32.989810', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 11:53:32.989810', '2020-04-14 11:53:32.989810', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 11:53:32.989810', '2020-04-14 11:53:32.989810', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 11:53:32.989810', '2020-04-14 11:53:32.989810', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 11:53:32.994818', '2020-04-14 11:53:32.994818'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.7ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.3ms) COMMIT  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [b0515f37-d69c-428d-8adc-2f517a78c769] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: b0515f37-d69c-428d-8adc-2f517a78c769) from Test(default) enqueued at 2020-04-14T11:53:33Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [b0515f37-d69c-428d-8adc-2f517a78c769] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: b0515f37-d69c-428d-8adc-2f517a78c769) from Test(default) in 26.28ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: b0515f37-d69c-428d-8adc-2f517a78c769) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [9499434c-3a27-48b8-b8a2-b51071493cee] Performing DiscoApp::SendSubscriptionJob (Job ID: 9499434c-3a27-48b8-b8a2-b51071493cee) from Test(default) enqueued at 2020-04-14T11:53:33Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [9499434c-3a27-48b8-b8a2-b51071493cee] DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [9499434c-3a27-48b8-b8a2-b51071493cee] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [9499434c-3a27-48b8-b8a2-b51071493cee] Performed DiscoApp::SendSubscriptionJob (Job ID: 9499434c-3a27-48b8-b8a2-b51071493cee) from Test(default) in 231.82ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 9499434c-3a27-48b8-b8a2-b51071493cee) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.6ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:53:33.421493', '2020-04-14 11:53:33.421493') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 245fb2cc-df9b-4fa7-ba20-61af40428518) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:53:33.427304', '2020-04-14 11:53:33.427304') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: c3b5b507-df82-4d71-a8f3-1269ea9d4a20) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 14 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 14 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 244)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 5) Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.3ms | Allocations: 1651)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 1.4ms | Allocations: 309) Completed 404 Not Found in 7ms (Views: 6.2ms | ActiveRecord: 0.4ms | Allocations: 2427)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:53:33.467787', '2020-04-14 11:53:33.467787') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 15  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:53:33.488739', '2020-04-14 11:53:33.488739') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 16  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:53:33.493449', '2020-04-14 11:53:33.493449') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 17  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:53:33.498807', '2020-04-14 11:53:33.498807') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 18  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 160)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 365)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.5ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:53:33.552796', '2020-04-14 11:53:33.552796') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: d2d34bb2-fd88-410d-a8fa-4d1c801241b7) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:53:33.558570', '2020-04-14 11:53:33.558570') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 032ecb5b-bb03-405c-9256-d600fce393cb) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.3ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 14 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 14 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8] Performing DiscoApp::SynchroniseUsersJob (Job ID: 36df11cc-a7b0-4c1f-ba0c-1a8444d597f8) from Test(default) enqueued at 2020-04-14T11:53:33Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8] DiscoApp::User Load (0.8ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8] DiscoApp::User Create (0.4ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 11:53:33.601121', '2020-04-14 11:53:33.601121') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 11:53:33.602993' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 11:53:33.605001', '2020-04-14 11:53:33.605001') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 11:53:33.605997' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [36df11cc-a7b0-4c1f-ba0c-1a8444d597f8] Performed DiscoApp::SynchroniseUsersJob (Job ID: 36df11cc-a7b0-4c1f-ba0c-1a8444d597f8) from Test(default) in 19.03ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: 36df11cc-a7b0-4c1f-ba0c-1a8444d597f8) to Test(default) with arguments: #> DiscoApp::User Load (0.3ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 415)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:53:33.634121' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: b8495b94-12d0-4374-9ac1-627508156f96) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 2.4ms | Allocations: 2735)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:53:33.643093' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: aba6ffc2-a143-40fa-9974-f38ffe5d52bb) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms | Allocations: 2067)  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:53:33.652023' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] Performing DiscoApp::AppUninstalledJob (Job ID: d0b120d6-0e45-4aca-b752-9d3535732396) from Test(default) enqueued at 2020-04-14T11:53:33Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 11:53:33.654907' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] [DiscoApp::SendSubscriptionJob] [ac2ae007-74fc-42a1-bdd1-a74c142c0745] Performing DiscoApp::SendSubscriptionJob (Job ID: ac2ae007-74fc-42a1-bdd1-a74c142c0745) from Test(default) enqueued at 2020-04-14T11:53:33Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] [DiscoApp::SendSubscriptionJob] [ac2ae007-74fc-42a1-bdd1-a74c142c0745] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] [DiscoApp::SendSubscriptionJob] [ac2ae007-74fc-42a1-bdd1-a74c142c0745] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] [DiscoApp::SendSubscriptionJob] [ac2ae007-74fc-42a1-bdd1-a74c142c0745] Performed DiscoApp::SendSubscriptionJob (Job ID: ac2ae007-74fc-42a1-bdd1-a74c142c0745) from Test(default) in 12.98ms [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] Enqueued DiscoApp::SendSubscriptionJob (Job ID: ac2ae007-74fc-42a1-bdd1-a74c142c0745) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] DiscoApp::Session Destroy (0.5ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 11:53:33.677853', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 11:53:33.680158' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d0b120d6-0e45-4aca-b752-9d3535732396] Performed DiscoApp::AppUninstalledJob (Job ID: d0b120d6-0e45-4aca-b752-9d3535732396) from Test(default) in 27.66ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: d0b120d6-0e45-4aca-b752-9d3535732396) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.4ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:53:33.687970' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] Performing DiscoApp::AppUninstalledJob (Job ID: 57c16454-4ce2-45a8-b931-942602d6f9cb) from Test(default) enqueued at 2020-04-14T11:53:33Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 11:53:33.691596' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] [DiscoApp::SendSubscriptionJob] [b1ae0a02-940a-49d9-bb70-f3762cadd650] Performing DiscoApp::SendSubscriptionJob (Job ID: b1ae0a02-940a-49d9-bb70-f3762cadd650) from Test(default) enqueued at 2020-04-14T11:53:33Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] [DiscoApp::SendSubscriptionJob] [b1ae0a02-940a-49d9-bb70-f3762cadd650] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] [DiscoApp::SendSubscriptionJob] [b1ae0a02-940a-49d9-bb70-f3762cadd650] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] [DiscoApp::SendSubscriptionJob] [b1ae0a02-940a-49d9-bb70-f3762cadd650] Performed DiscoApp::SendSubscriptionJob (Job ID: b1ae0a02-940a-49d9-bb70-f3762cadd650) from Test(default) in 13.85ms [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] Enqueued DiscoApp::SendSubscriptionJob (Job ID: b1ae0a02-940a-49d9-bb70-f3762cadd650) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 11:53:33.710729', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 11:53:33.712558' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [57c16454-4ce2-45a8-b931-942602d6f9cb] Performed DiscoApp::AppUninstalledJob (Job ID: 57c16454-4ce2-45a8-b931-942602d6f9cb) from Test(default) in 23.21ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 57c16454-4ce2-45a8-b931-942602d6f9cb) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:33.723426' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 11:53:33.725003' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.4ms | Allocations: 1084)  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:33.734480' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 15.3ms | Allocations: 10400) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.9ms | Allocations: 98) Completed 200 OK in 547ms (Views: 541.6ms | ActiveRecord: 2.4ms | Allocations: 535625)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.289808' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:34.299793' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:53:34.301891', '2020-04-14 11:53:34.301891', '2020-04-14 11:53:34.300483', '2020-05-12 11:53:34.300499', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: ee428e2b-651f-4dbd-9d79-229274445a01) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 10ms (ActiveRecord: 1.8ms | Allocations: 4629) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.312243' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 3.9ms | Allocations: 2312) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 14) Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 1.2ms | Allocations: 5231)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.328079' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 2417) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.340556' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 414)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.1ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.346759' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:34.354393' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:53:34.361385', '2020-04-14 11:53:34.361385', '2020-04-14 11:53:34.360786', '2020-06-13 11:53:34.360804', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 2fdd946d-1cd8-453e-a577-c25643d18177) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 20ms (ActiveRecord: 3.4ms | Allocations: 9167) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.375646' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.6ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:34.389963' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:53:34.392448', '2020-04-14 11:53:34.392448', '2020-04-14 11:53:34.391769', '2020-05-12 11:53:34.391786', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 798ec3d4-fa92-4022-b614-71b5b36e7b5f) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 22ms (ActiveRecord: 3.5ms | Allocations: 4102) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (1.3ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.421366' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (1.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 11:53:34.455361' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 25ms (ActiveRecord: 2.3ms | Allocations: 7229)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.463351' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 11:53:34.466178' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 480)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.477933' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.7ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 11:53:34.502805' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.517281' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 34ms (ActiveRecord: 3.7ms | Allocations: 11651) DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (1.0ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.526191' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 19ms (ActiveRecord: 1.8ms | Allocations: 5491)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.556594' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.6ms | Allocations: 431) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 19ms (Views: 14.1ms | ActiveRecord: 1.2ms | Allocations: 4296)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.583905' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 1.6ms | Allocations: 1596)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.595524' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 4ms (ActiveRecord: 1.3ms | Allocations: 1900)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.607648' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 215)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.613504' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 3ms (ActiveRecord: 0.8ms | Allocations: 1243)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.621275' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 11:53:34.630026', '2020-04-14 11:53:34.630026') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 11:53:34.636735', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 13ms (ActiveRecord: 3.6ms | Allocations: 7553)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.649906' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 4ms (ActiveRecord: 1.1ms | Allocations: 1051)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 11:53:34.665679' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 512)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.672775' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.5ms | Allocations: 109) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 10ms (Views: 2.3ms | ActiveRecord: 2.3ms | Allocations: 4682)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:53:34.689266' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 11:53:34.697815' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.4ms | Allocations: 512)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 22) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 20) Completed 200 OK in 25ms (Views: 5.1ms | ActiveRecord: 1.8ms | Allocations: 9395)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.737537' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 11:53:34.740221' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 0.8ms | Allocations: 877)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 217)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.783030' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 11:53:34.785468' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 11ms (ActiveRecord: 2.5ms | Allocations: 2625)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:53:34.807046' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 11:53:34.817038' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:34.828252' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 11ms (ActiveRecord: 2.6ms | Allocations: 2591)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 19:53:34 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [e0968304-488c-4c50-9219-d9d9e05a4855] Performing ProductsDeleteJob (Job ID: e0968304-488c-4c50-9219-d9d9e05a4855) from Test(default) enqueued at 2020-04-14T11:53:34Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [e0968304-488c-4c50-9219-d9d9e05a4855] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [e0968304-488c-4c50-9219-d9d9e05a4855] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [e0968304-488c-4c50-9219-d9d9e05a4855]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [e0968304-488c-4c50-9219-d9d9e05a4855] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [e0968304-488c-4c50-9219-d9d9e05a4855]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [e0968304-488c-4c50-9219-d9d9e05a4855] Performed ProductsDeleteJob (Job ID: e0968304-488c-4c50-9219-d9d9e05a4855) from Test(default) in 2.16ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: e0968304-488c-4c50-9219-d9d9e05a4855) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.0ms | Allocations: 1714)  (0.3ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 Product Update (0.5ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 11:53:34.953318' WHERE "products"."id" = 632910393  (0.2ms) RELEASE SAVEPOINT active_record_1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 19:53:34 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [b09f29ed-1dc3-4c23-a283-7938f3f39857] Performing ProductsUpdateJob (Job ID: b09f29ed-1dc3-4c23-a283-7938f3f39857) from Test(default) enqueued at 2020-04-14T11:53:34Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [b09f29ed-1dc3-4c23-a283-7938f3f39857] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [b09f29ed-1dc3-4c23-a283-7938f3f39857] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [b09f29ed-1dc3-4c23-a283-7938f3f39857]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [b09f29ed-1dc3-4c23-a283-7938f3f39857] Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 11:53:34.981433' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [b09f29ed-1dc3-4c23-a283-7938f3f39857]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [b09f29ed-1dc3-4c23-a283-7938f3f39857] Performed ProductsUpdateJob (Job ID: b09f29ed-1dc3-4c23-a283-7938f3f39857) from Test(default) in 5.29ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: b09f29ed-1dc3-4c23-a283-7938f3f39857) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 1.5ms | Allocations: 8450) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 19:53:34 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [8e31f44b-9fce-46a8-bd47-877706ece5f2] Performing CartsUpdateJob (Job ID: 8e31f44b-9fce-46a8-bd47-877706ece5f2) from Test(default) enqueued at 2020-04-14T11:53:34Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [8e31f44b-9fce-46a8-bd47-877706ece5f2] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [8e31f44b-9fce-46a8-bd47-877706ece5f2] Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [8e31f44b-9fce-46a8-bd47-877706ece5f2]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [8e31f44b-9fce-46a8-bd47-877706ece5f2] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 11:53:34.998407' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [8e31f44b-9fce-46a8-bd47-877706ece5f2]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [8e31f44b-9fce-46a8-bd47-877706ece5f2] Performed CartsUpdateJob (Job ID: 8e31f44b-9fce-46a8-bd47-877706ece5f2) from Test(default) in 6.53ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: 8e31f44b-9fce-46a8-bd47-877706ece5f2) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.2ms | ActiveRecord: 1.1ms | Allocations: 6374) Cart Load (0.2ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 19:53:35 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [94fcad48-2c68-4a2e-b5ef-164c8e7f16f3] Performing ProductsCreateJob (Job ID: 94fcad48-2c68-4a2e-b5ef-164c8e7f16f3) from Test(default) enqueued at 2020-04-14T11:53:35Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [94fcad48-2c68-4a2e-b5ef-164c8e7f16f3] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [94fcad48-2c68-4a2e-b5ef-164c8e7f16f3] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [94fcad48-2c68-4a2e-b5ef-164c8e7f16f3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [94fcad48-2c68-4a2e-b5ef-164c8e7f16f3] Product Create (0.5ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 11:53:35.010027', '2020-04-14 11:53:35.010027') RETURNING "id" [ActiveJob] [ProductsCreateJob] [94fcad48-2c68-4a2e-b5ef-164c8e7f16f3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [94fcad48-2c68-4a2e-b5ef-164c8e7f16f3] Performed ProductsCreateJob (Job ID: 94fcad48-2c68-4a2e-b5ef-164c8e7f16f3) from Test(default) in 6.39ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 94fcad48-2c68-4a2e-b5ef-164c8e7f16f3) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 10ms (Views: 0.2ms | ActiveRecord: 1.5ms | Allocations: 12383) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:35.019454' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:53:35.019454', '2020-04-14 11:53:35.019454', '2020-04-14 11:53:35.019454', '2020-06-13 11:53:35.019454', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: abaa2fc3-992a-44bf-8f22-8dc04cb37643) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:35.028386' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:53:35.028386', '2020-04-14 11:53:35.028386', '2020-04-14 11:53:35.028386', '2020-05-12 11:53:35.028386', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6b5bf6c4-5dd7-4e32-b5f0-5c4e1c80aff2) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857546 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857546 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:35.037740' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:53:35.037740', '2020-04-14 11:53:35.037740', '2020-04-14 11:53:35.037740', '2020-05-12 11:53:35.037740', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: e2c8c995-ecdd-473f-beaf-afd6e4cabd13) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:35.044798' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 11:53:35.044798', '2020-04-14 11:53:35.044798') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: da396d78-4cab-4d21-a2d6-cfc6f8b80feb) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:35.049796' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:53:35.049796', '2020-04-14 11:53:35.049796', '2020-04-14 11:53:35.049796', '2020-05-12 11:53:35.049796', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 88aff3f3-e666-4fbd-9535-5f2c375bcae4) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:35.058090' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:53:35.058090', '2020-04-14 11:53:35.058090', '2020-04-14 11:53:35.058090', '2020-05-12 11:53:35.058090', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 1d42a654-a741-4b72-8bfd-467c07b1be95) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 35d8879f-5062-4c4f-b940-b0c622ece7dd) to Test(default) with arguments: #>, #>, "widget_assets"  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: cf636b36-2893-4cf4-9f7f-e15b0d64c5b0) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.1ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 2bb3f201-8d69-4ac5-b2e6-e1565c21fe17) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 2b513395-4ee3-4471-8881-2fa6605095ff) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.4ms | Allocations: 128)  (0.4ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 1.3ms | Allocations: 109) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.7ms | Allocations: 142)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.5ms | Allocations: 92)  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.4ms | Allocations: 114)  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: a50fb041-7e6e-4d41-aee6-72ee4f65d6a1) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 964fd09e-baa2-4684-a912-20220ea5fa3d) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 2e01872a-991d-4646-8a6e-08dc95a96550) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:35.886928' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 745)  (0.4ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 11:53:35.898451' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 479)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:53:35.908229' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: d1076a50-87c8-444b-a4f5-bf69ce22adb2) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.0ms | Allocations: 2370) DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.7ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:35.915934' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:53:35.921131' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 842aff38-397d-464a-9145-dada2b2ffada) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.6ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 342)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 11:53:35.927598' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.5ms | Allocations: 85) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 4ms (Views: 2.3ms | ActiveRecord: 0.4ms | Allocations: 3035)  (0.2ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 11:53:35.947006' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 11:53:35.964808' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 11:53:35.973753' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 11:53:35.996964' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 11:53:36.006273' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 11:53:36.020136', '2020-04-14 11:53:36.020136') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.4ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 11:53:36.031387', '2020-04-14 11:53:36.031387') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 11:53:36.044254' WHERE "disco_app_subscriptions"."id" = 304261385  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 11:53:36.047409' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.2ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:53:36.082831' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] Performing DiscoApp::AppInstalledJob (Job ID: 9b602d90-a923-4612-a0d7-665ad78691f3) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 11:53:36.086053' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SynchroniseWebhooksJob] [47c2a1c5-c94b-41ce-b911-df5205ef70f8] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 47c2a1c5-c94b-41ce-b911-df5205ef70f8) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SynchroniseWebhooksJob] [47c2a1c5-c94b-41ce-b911-df5205ef70f8] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 47c2a1c5-c94b-41ce-b911-df5205ef70f8) from Test(default) in 14.26ms [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SynchroniseCarrierServiceJob] [e5211720-f52e-46d7-b021-c0d6418c7319] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: e5211720-f52e-46d7-b021-c0d6418c7319) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SynchroniseCarrierServiceJob] [e5211720-f52e-46d7-b021-c0d6418c7319] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: e5211720-f52e-46d7-b021-c0d6418c7319) from Test(default) in 3.2ms [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::ShopUpdateJob] [b8746ccc-e15d-47f0-8b8b-b4a9c12c08c0] Performing DiscoApp::ShopUpdateJob (Job ID: b8746ccc-e15d-47f0-8b8b-b4a9c12c08c0) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::ShopUpdateJob] [b8746ccc-e15d-47f0-8b8b-b4a9c12c08c0]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::ShopUpdateJob] [b8746ccc-e15d-47f0-8b8b-b4a9c12c08c0] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::ShopUpdateJob] [b8746ccc-e15d-47f0-8b8b-b4a9c12c08c0] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::ShopUpdateJob] [b8746ccc-e15d-47f0-8b8b-b4a9c12c08c0]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::ShopUpdateJob] [b8746ccc-e15d-47f0-8b8b-b4a9c12c08c0] Performed DiscoApp::ShopUpdateJob (Job ID: b8746ccc-e15d-47f0-8b8b-b4a9c12c08c0) from Test(default) in 7.57ms [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:36.117957' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 11:53:36.119063', '2020-04-14 11:53:36.119063') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857551 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SubscriptionChangedJob] [4c1fbd50-5f41-4793-9e9f-c56bfd95e763] Performing DiscoApp::SubscriptionChangedJob (Job ID: 4c1fbd50-5f41-4793-9e9f-c56bfd95e763) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SubscriptionChangedJob] [4c1fbd50-5f41-4793-9e9f-c56bfd95e763] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SubscriptionChangedJob] [4c1fbd50-5f41-4793-9e9f-c56bfd95e763] [DiscoApp::SendSubscriptionJob] [6b8511e8-e4c7-410d-b152-e071515e85fe] Performing DiscoApp::SendSubscriptionJob (Job ID: 6b8511e8-e4c7-410d-b152-e071515e85fe) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SubscriptionChangedJob] [4c1fbd50-5f41-4793-9e9f-c56bfd95e763] [DiscoApp::SendSubscriptionJob] [6b8511e8-e4c7-410d-b152-e071515e85fe] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SubscriptionChangedJob] [4c1fbd50-5f41-4793-9e9f-c56bfd95e763] [DiscoApp::SendSubscriptionJob] [6b8511e8-e4c7-410d-b152-e071515e85fe] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SubscriptionChangedJob] [4c1fbd50-5f41-4793-9e9f-c56bfd95e763] [DiscoApp::SendSubscriptionJob] [6b8511e8-e4c7-410d-b152-e071515e85fe] Performed DiscoApp::SendSubscriptionJob (Job ID: 6b8511e8-e4c7-410d-b152-e071515e85fe) from Test(default) in 13.54ms [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SubscriptionChangedJob] [4c1fbd50-5f41-4793-9e9f-c56bfd95e763] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 6b8511e8-e4c7-410d-b152-e071515e85fe) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] [DiscoApp::SubscriptionChangedJob] [4c1fbd50-5f41-4793-9e9f-c56bfd95e763] Performed DiscoApp::SubscriptionChangedJob (Job ID: 4c1fbd50-5f41-4793-9e9f-c56bfd95e763) from Test(default) in 14.86ms [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 4c1fbd50-5f41-4793-9e9f-c56bfd95e763) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:36.139396' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9b602d90-a923-4612-a0d7-665ad78691f3] Performed DiscoApp::AppInstalledJob (Job ID: 9b602d90-a923-4612-a0d7-665ad78691f3) from Test(default) in 55.7ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 9b602d90-a923-4612-a0d7-665ad78691f3) to Test(default) with arguments: #> DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:53:36.153394' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] Performing DiscoApp::AppInstalledJob (Job ID: 352b5d4b-d496-4133-907e-32b19f3e6d04) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 11:53:36.156878' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SynchroniseWebhooksJob] [f7abd054-649d-44c3-878a-15c4360c8829] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: f7abd054-649d-44c3-878a-15c4360c8829) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SynchroniseWebhooksJob] [f7abd054-649d-44c3-878a-15c4360c8829] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: f7abd054-649d-44c3-878a-15c4360c8829) from Test(default) in 50.64ms [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SynchroniseCarrierServiceJob] [45ec178c-03ff-4a52-825d-81ed91713c15] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 45ec178c-03ff-4a52-825d-81ed91713c15) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SynchroniseCarrierServiceJob] [45ec178c-03ff-4a52-825d-81ed91713c15] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 45ec178c-03ff-4a52-825d-81ed91713c15) from Test(default) in 3.95ms [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::ShopUpdateJob] [0588b38a-d577-447e-a2b0-4af40da203c8] Performing DiscoApp::ShopUpdateJob (Job ID: 0588b38a-d577-447e-a2b0-4af40da203c8) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::ShopUpdateJob] [0588b38a-d577-447e-a2b0-4af40da203c8]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::ShopUpdateJob] [0588b38a-d577-447e-a2b0-4af40da203c8] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::ShopUpdateJob] [0588b38a-d577-447e-a2b0-4af40da203c8] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::ShopUpdateJob] [0588b38a-d577-447e-a2b0-4af40da203c8]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::ShopUpdateJob] [0588b38a-d577-447e-a2b0-4af40da203c8] Performed DiscoApp::ShopUpdateJob (Job ID: 0588b38a-d577-447e-a2b0-4af40da203c8) from Test(default) in 5.57ms [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:36.220262' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 11:53:36.225146', '2020-04-14 11:53:36.225146', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857552 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SubscriptionChangedJob] [4fd84ae0-0832-40c7-b509-ba9c4185ef74] Performing DiscoApp::SubscriptionChangedJob (Job ID: 4fd84ae0-0832-40c7-b509-ba9c4185ef74) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SubscriptionChangedJob] [4fd84ae0-0832-40c7-b509-ba9c4185ef74] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SubscriptionChangedJob] [4fd84ae0-0832-40c7-b509-ba9c4185ef74] [DiscoApp::SendSubscriptionJob] [b9d988b9-e5ac-4ea5-9ca6-98add5805b38] Performing DiscoApp::SendSubscriptionJob (Job ID: b9d988b9-e5ac-4ea5-9ca6-98add5805b38) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SubscriptionChangedJob] [4fd84ae0-0832-40c7-b509-ba9c4185ef74] [DiscoApp::SendSubscriptionJob] [b9d988b9-e5ac-4ea5-9ca6-98add5805b38] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SubscriptionChangedJob] [4fd84ae0-0832-40c7-b509-ba9c4185ef74] [DiscoApp::SendSubscriptionJob] [b9d988b9-e5ac-4ea5-9ca6-98add5805b38] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SubscriptionChangedJob] [4fd84ae0-0832-40c7-b509-ba9c4185ef74] [DiscoApp::SendSubscriptionJob] [b9d988b9-e5ac-4ea5-9ca6-98add5805b38] Performed DiscoApp::SendSubscriptionJob (Job ID: b9d988b9-e5ac-4ea5-9ca6-98add5805b38) from Test(default) in 13.91ms [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SubscriptionChangedJob] [4fd84ae0-0832-40c7-b509-ba9c4185ef74] Enqueued DiscoApp::SendSubscriptionJob (Job ID: b9d988b9-e5ac-4ea5-9ca6-98add5805b38) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] [DiscoApp::SubscriptionChangedJob] [4fd84ae0-0832-40c7-b509-ba9c4185ef74] Performed DiscoApp::SubscriptionChangedJob (Job ID: 4fd84ae0-0832-40c7-b509-ba9c4185ef74) from Test(default) in 15.36ms [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 4fd84ae0-0832-40c7-b509-ba9c4185ef74) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:36.245318' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [352b5d4b-d496-4133-907e-32b19f3e6d04] Performed DiscoApp::AppInstalledJob (Job ID: 352b5d4b-d496-4133-907e-32b19f3e6d04) from Test(default) in 90.94ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 352b5d4b-d496-4133-907e-32b19f3e6d04) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.4ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:53:36.257312' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] Performing DiscoApp::AppInstalledJob (Job ID: 93a3a6a3-51d5-4e77-a282-e263b63d4c5d) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 11:53:36.260570' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SynchroniseWebhooksJob] [078f54d6-8625-41f8-a3f2-cf29c3a722d5] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 078f54d6-8625-41f8-a3f2-cf29c3a722d5) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SynchroniseWebhooksJob] [078f54d6-8625-41f8-a3f2-cf29c3a722d5] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 078f54d6-8625-41f8-a3f2-cf29c3a722d5) from Test(default) in 12.91ms [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SynchroniseCarrierServiceJob] [4e3e02da-9873-4ee7-8e7f-2b030514a817] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 4e3e02da-9873-4ee7-8e7f-2b030514a817) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SynchroniseCarrierServiceJob] [4e3e02da-9873-4ee7-8e7f-2b030514a817] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 4e3e02da-9873-4ee7-8e7f-2b030514a817) from Test(default) in 3.22ms [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::ShopUpdateJob] [9927045b-f3ec-4f80-a606-613a072bbaab] Performing DiscoApp::ShopUpdateJob (Job ID: 9927045b-f3ec-4f80-a606-613a072bbaab) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::ShopUpdateJob] [9927045b-f3ec-4f80-a606-613a072bbaab]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::ShopUpdateJob] [9927045b-f3ec-4f80-a606-613a072bbaab] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::ShopUpdateJob] [9927045b-f3ec-4f80-a606-613a072bbaab] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::ShopUpdateJob] [9927045b-f3ec-4f80-a606-613a072bbaab]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::ShopUpdateJob] [9927045b-f3ec-4f80-a606-613a072bbaab] Performed DiscoApp::ShopUpdateJob (Job ID: 9927045b-f3ec-4f80-a606-613a072bbaab) from Test(default) in 5.32ms [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:53:36.285464' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 11:53:36.286407', '2020-04-14 11:53:36.286407') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857553 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SubscriptionChangedJob] [6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8] Performing DiscoApp::SubscriptionChangedJob (Job ID: 6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SubscriptionChangedJob] [6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SubscriptionChangedJob] [6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8] [DiscoApp::SendSubscriptionJob] [f6c9a17d-2530-46c6-af5d-2f44e7bf22e7] Performing DiscoApp::SendSubscriptionJob (Job ID: f6c9a17d-2530-46c6-af5d-2f44e7bf22e7) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SubscriptionChangedJob] [6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8] [DiscoApp::SendSubscriptionJob] [f6c9a17d-2530-46c6-af5d-2f44e7bf22e7] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SubscriptionChangedJob] [6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8] [DiscoApp::SendSubscriptionJob] [f6c9a17d-2530-46c6-af5d-2f44e7bf22e7] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SubscriptionChangedJob] [6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8] [DiscoApp::SendSubscriptionJob] [f6c9a17d-2530-46c6-af5d-2f44e7bf22e7] Performed DiscoApp::SendSubscriptionJob (Job ID: f6c9a17d-2530-46c6-af5d-2f44e7bf22e7) from Test(default) in 13.74ms [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SubscriptionChangedJob] [6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8] Enqueued DiscoApp::SendSubscriptionJob (Job ID: f6c9a17d-2530-46c6-af5d-2f44e7bf22e7) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] [DiscoApp::SubscriptionChangedJob] [6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8] Performed DiscoApp::SubscriptionChangedJob (Job ID: 6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8) from Test(default) in 15.43ms [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6fa39caa-fcd6-45d4-b6ae-4db69d8e23a8) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:53:36.306226' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [93a3a6a3-51d5-4e77-a282-e263b63d4c5d] Performed DiscoApp::AppInstalledJob (Job ID: 93a3a6a3-51d5-4e77-a282-e263b63d4c5d) from Test(default) in 47.88ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 93a3a6a3-51d5-4e77-a282-e263b63d4c5d) to Test(default) with arguments: #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.6ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:53:36.310874', '2020-04-14 11:53:36.310874') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.4ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 15  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:53:36.318659', '2020-04-14 11:53:36.318659') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 16  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:53:36.322986', '2020-04-14 11:53:36.322986') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 17  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:53:36.327636', '2020-04-14 11:53:36.327636') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 18  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 18  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.5ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 11:53:36.341289', '2020-04-14 11:53:36.341289', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 11:53:36.342903', '2020-04-14 11:53:36.342903') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.1ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 11:53:36.347442', '2020-04-14 11:53:36.347442', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 11:53:36.351276', '2020-04-14 11:53:36.351276', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [febe1dbc-9a89-482e-8909-30bb4dc8e306] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: febe1dbc-9a89-482e-8909-30bb4dc8e306) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [febe1dbc-9a89-482e-8909-30bb4dc8e306] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: febe1dbc-9a89-482e-8909-30bb4dc8e306) from Test(default) in 21.48ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: febe1dbc-9a89-482e-8909-30bb4dc8e306) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [671d535e-6465-4673-9311-3553e03ce459] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 671d535e-6465-4673-9311-3553e03ce459) from Test(default) enqueued at 2020-04-14T11:53:36Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [671d535e-6465-4673-9311-3553e03ce459] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 671d535e-6465-4673-9311-3553e03ce459) from Test(default) in 13.25ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 671d535e-6465-4673-9311-3553e03ce459) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.2ms) BEGIN  (0.9ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.5ms) COMMIT  (0.1ms) BEGIN Fixtures Load (2.6ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 11:59:44.037374', '2020-04-14 11:59:44.037374'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 11:59:44.041232', '2020-04-14 11:59:44.041232', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 11:59:44.041232', '2020-04-14 11:59:44.041232', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 11:59:44.046285', '2020-04-14 11:59:44.046285', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 11:59:44.046285', '2020-04-14 11:59:44.046285', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 11:59:44.048681', '2020-04-14 11:59:44.048681', DEFAULT, DEFAULT, '2020-04-07 11:59:44', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 11:59:44.048681', '2020-04-14 11:59:44.048681', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 11:59:44.051210', '2020-04-14 11:59:44.051210'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 11:59:44.053269', '2020-04-14 11:59:44.053269', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 11:59:44.055303', '2020-04-14 11:59:44.055303', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 11:59:44.055303', '2020-04-14 11:59:44.055303', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 11:59:44.055303', '2020-04-14 11:59:44.055303', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 11:59:44.055303', '2020-04-14 11:59:44.055303', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 11:59:44.055303', '2020-04-14 11:59:44.055303', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 11:59:44.055303', '2020-04-14 11:59:44.055303', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 11:59:44.059774', '2020-04-14 11:59:44.059774'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.8ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.6ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:59:44.127960', '2020-04-14 11:59:44.127960') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: e5a0b77e-5c04-442c-be31-b23c1215429f) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:59:44.221998', '2020-04-14 11:59:44.221998') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 7263ae36-b87c-4ed7-a7e6-42f2e4ea090f) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 20 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 20 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.7ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:44.237917' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:59:44.237917', '2020-04-14 11:59:44.237917', '2020-04-14 11:59:44.237917', '2020-05-12 11:59:44.237917', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b11e036c-5884-40d2-8df5-8d9e3b3a3ed9) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:44.280506' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:59:44.280506', '2020-04-14 11:59:44.280506', '2020-04-14 11:59:44.280506', '2020-05-12 11:59:44.280506', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 2a37218d-6ea1-45ad-9d1f-2ad1c8f65e8b) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (3.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:44.302041' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 11:59:44.302041', '2020-04-14 11:59:44.302041') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 35b297e3-b4c3-4a63-a2dc-68a8ff6e4967) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:44.307953' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.5ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:59:44.307953', '2020-04-14 11:59:44.307953', '2020-04-14 11:59:44.307953', '2020-06-13 11:59:44.307953', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 659e5779-a0ed-4065-b3a6-abb76548d5f3) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:44.320651' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:59:44.320651', '2020-04-14 11:59:44.320651', '2020-04-14 11:59:44.320651', '2020-05-12 11:59:44.320651', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 504fb32f-1608-4b2d-abd9-fade922d3d89) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:44.329658' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:59:44.329658', '2020-04-14 11:59:44.329658', '2020-04-14 11:59:44.329658', '2020-05-12 11:59:44.329658', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 8c6876f5-41f7-4bdf-bf2d-21e9a2feff12) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857547 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857547 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.2ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:59:44.350146' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] Performing DiscoApp::AppInstalledJob (Job ID: b72f4863-9689-4f7b-9a5b-698704da503b) from Test(default) enqueued at 2020-04-14T11:59:44Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 11:59:44.376943' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SynchroniseWebhooksJob] [19d64783-235e-49f1-9bfc-04b9a1964411] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 19d64783-235e-49f1-9bfc-04b9a1964411) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SynchroniseWebhooksJob] [19d64783-235e-49f1-9bfc-04b9a1964411] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 19d64783-235e-49f1-9bfc-04b9a1964411) from Test(default) in 14.38ms [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SynchroniseCarrierServiceJob] [0a33cce2-180f-480e-b5e2-bc56053c2d59] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 0a33cce2-180f-480e-b5e2-bc56053c2d59) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SynchroniseCarrierServiceJob] [0a33cce2-180f-480e-b5e2-bc56053c2d59] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 0a33cce2-180f-480e-b5e2-bc56053c2d59) from Test(default) in 4.68ms [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::ShopUpdateJob] [9a9668be-6b6e-4eed-aa71-2329474c7376] Performing DiscoApp::ShopUpdateJob (Job ID: 9a9668be-6b6e-4eed-aa71-2329474c7376) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::ShopUpdateJob] [9a9668be-6b6e-4eed-aa71-2329474c7376]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::ShopUpdateJob] [9a9668be-6b6e-4eed-aa71-2329474c7376] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::ShopUpdateJob] [9a9668be-6b6e-4eed-aa71-2329474c7376] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::ShopUpdateJob] [9a9668be-6b6e-4eed-aa71-2329474c7376]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::ShopUpdateJob] [9a9668be-6b6e-4eed-aa71-2329474c7376] Performed DiscoApp::ShopUpdateJob (Job ID: 9a9668be-6b6e-4eed-aa71-2329474c7376) from Test(default) in 6.8ms [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:44.416747' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Subscription Create (0.5ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 11:59:44.421537', '2020-04-14 11:59:44.421537', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857548 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SubscriptionChangedJob] [d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe] Performing DiscoApp::SubscriptionChangedJob (Job ID: d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe) from Test(default) enqueued at 2020-04-14T11:59:44Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SubscriptionChangedJob] [d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SubscriptionChangedJob] [d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe] [DiscoApp::SendSubscriptionJob] [0ce0155a-4072-43ad-9cf7-410dd1f5352a] Performing DiscoApp::SendSubscriptionJob (Job ID: 0ce0155a-4072-43ad-9cf7-410dd1f5352a) from Test(default) enqueued at 2020-04-14T11:59:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SubscriptionChangedJob] [d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe] [DiscoApp::SendSubscriptionJob] [0ce0155a-4072-43ad-9cf7-410dd1f5352a] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SubscriptionChangedJob] [d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe] [DiscoApp::SendSubscriptionJob] [0ce0155a-4072-43ad-9cf7-410dd1f5352a] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SubscriptionChangedJob] [d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe] [DiscoApp::SendSubscriptionJob] [0ce0155a-4072-43ad-9cf7-410dd1f5352a] Performed DiscoApp::SendSubscriptionJob (Job ID: 0ce0155a-4072-43ad-9cf7-410dd1f5352a) from Test(default) in 198.2ms [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SubscriptionChangedJob] [d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 0ce0155a-4072-43ad-9cf7-410dd1f5352a) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] [DiscoApp::SubscriptionChangedJob] [d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe] Performed DiscoApp::SubscriptionChangedJob (Job ID: d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe) from Test(default) in 200.31ms [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d3ecefaf-f4b4-48a0-b2a0-3f055afc03fe) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:44.627616' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b72f4863-9689-4f7b-9a5b-698704da503b] Performed DiscoApp::AppInstalledJob (Job ID: b72f4863-9689-4f7b-9a5b-698704da503b) from Test(default) in 271.85ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: b72f4863-9689-4f7b-9a5b-698704da503b) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.5ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:59:44.663218' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] Performing DiscoApp::AppInstalledJob (Job ID: ef86b1a8-a008-4e51-8439-e4bf35ce9f64) from Test(default) enqueued at 2020-04-14T11:59:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 11:59:44.667332' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SynchroniseWebhooksJob] [5a6cf6ae-5f32-4da6-873e-7ec1c2cb5911] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 5a6cf6ae-5f32-4da6-873e-7ec1c2cb5911) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SynchroniseWebhooksJob] [5a6cf6ae-5f32-4da6-873e-7ec1c2cb5911] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 5a6cf6ae-5f32-4da6-873e-7ec1c2cb5911) from Test(default) in 15.31ms [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SynchroniseCarrierServiceJob] [7f256df9-0177-4bdf-bd84-5d97d08cacfc] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7f256df9-0177-4bdf-bd84-5d97d08cacfc) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SynchroniseCarrierServiceJob] [7f256df9-0177-4bdf-bd84-5d97d08cacfc] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7f256df9-0177-4bdf-bd84-5d97d08cacfc) from Test(default) in 4.72ms [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::ShopUpdateJob] [8dc1fb35-7803-4d4d-94d1-19f77aaa2dcb] Performing DiscoApp::ShopUpdateJob (Job ID: 8dc1fb35-7803-4d4d-94d1-19f77aaa2dcb) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::ShopUpdateJob] [8dc1fb35-7803-4d4d-94d1-19f77aaa2dcb]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::ShopUpdateJob] [8dc1fb35-7803-4d4d-94d1-19f77aaa2dcb] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::ShopUpdateJob] [8dc1fb35-7803-4d4d-94d1-19f77aaa2dcb] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::ShopUpdateJob] [8dc1fb35-7803-4d4d-94d1-19f77aaa2dcb]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::ShopUpdateJob] [8dc1fb35-7803-4d4d-94d1-19f77aaa2dcb] Performed DiscoApp::ShopUpdateJob (Job ID: 8dc1fb35-7803-4d4d-94d1-19f77aaa2dcb) from Test(default) in 6.84ms [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:44.698780' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 11:59:44.700024', '2020-04-14 11:59:44.700024') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857549 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SubscriptionChangedJob] [4108dd5b-efeb-4c87-982c-fe1a4b00fc82] Performing DiscoApp::SubscriptionChangedJob (Job ID: 4108dd5b-efeb-4c87-982c-fe1a4b00fc82) from Test(default) enqueued at 2020-04-14T11:59:44Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SubscriptionChangedJob] [4108dd5b-efeb-4c87-982c-fe1a4b00fc82] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SubscriptionChangedJob] [4108dd5b-efeb-4c87-982c-fe1a4b00fc82] [DiscoApp::SendSubscriptionJob] [34aa59a8-9044-4dde-85d0-7dc5e48256c0] Performing DiscoApp::SendSubscriptionJob (Job ID: 34aa59a8-9044-4dde-85d0-7dc5e48256c0) from Test(default) enqueued at 2020-04-14T11:59:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SubscriptionChangedJob] [4108dd5b-efeb-4c87-982c-fe1a4b00fc82] [DiscoApp::SendSubscriptionJob] [34aa59a8-9044-4dde-85d0-7dc5e48256c0] DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SubscriptionChangedJob] [4108dd5b-efeb-4c87-982c-fe1a4b00fc82] [DiscoApp::SendSubscriptionJob] [34aa59a8-9044-4dde-85d0-7dc5e48256c0] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SubscriptionChangedJob] [4108dd5b-efeb-4c87-982c-fe1a4b00fc82] [DiscoApp::SendSubscriptionJob] [34aa59a8-9044-4dde-85d0-7dc5e48256c0] Performed DiscoApp::SendSubscriptionJob (Job ID: 34aa59a8-9044-4dde-85d0-7dc5e48256c0) from Test(default) in 15.36ms [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SubscriptionChangedJob] [4108dd5b-efeb-4c87-982c-fe1a4b00fc82] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 34aa59a8-9044-4dde-85d0-7dc5e48256c0) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] [DiscoApp::SubscriptionChangedJob] [4108dd5b-efeb-4c87-982c-fe1a4b00fc82] Performed DiscoApp::SubscriptionChangedJob (Job ID: 4108dd5b-efeb-4c87-982c-fe1a4b00fc82) from Test(default) in 17.03ms [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 4108dd5b-efeb-4c87-982c-fe1a4b00fc82) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:44.723013' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [ef86b1a8-a008-4e51-8439-e4bf35ce9f64] Performed DiscoApp::AppInstalledJob (Job ID: ef86b1a8-a008-4e51-8439-e4bf35ce9f64) from Test(default) in 58.54ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: ef86b1a8-a008-4e51-8439-e4bf35ce9f64) to Test(default) with arguments: #> DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:59:44.735147' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] Performing DiscoApp::AppInstalledJob (Job ID: d9a294b8-c564-4d31-b709-72bb35136c04) from Test(default) enqueued at 2020-04-14T11:59:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 11:59:44.738630' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SynchroniseWebhooksJob] [cd250b8f-3f47-4ba1-aedc-023a2a75aac3] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: cd250b8f-3f47-4ba1-aedc-023a2a75aac3) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SynchroniseWebhooksJob] [cd250b8f-3f47-4ba1-aedc-023a2a75aac3] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: cd250b8f-3f47-4ba1-aedc-023a2a75aac3) from Test(default) in 16.46ms [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SynchroniseCarrierServiceJob] [b7efbd3f-0f30-4000-ae0b-02d65f7d46dc] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: b7efbd3f-0f30-4000-ae0b-02d65f7d46dc) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SynchroniseCarrierServiceJob] [b7efbd3f-0f30-4000-ae0b-02d65f7d46dc] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: b7efbd3f-0f30-4000-ae0b-02d65f7d46dc) from Test(default) in 3.55ms [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::ShopUpdateJob] [c7a6150c-1ba7-46d5-9b37-530213f0d4a7] Performing DiscoApp::ShopUpdateJob (Job ID: c7a6150c-1ba7-46d5-9b37-530213f0d4a7) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::ShopUpdateJob] [c7a6150c-1ba7-46d5-9b37-530213f0d4a7]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::ShopUpdateJob] [c7a6150c-1ba7-46d5-9b37-530213f0d4a7] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::ShopUpdateJob] [c7a6150c-1ba7-46d5-9b37-530213f0d4a7] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::ShopUpdateJob] [c7a6150c-1ba7-46d5-9b37-530213f0d4a7]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::ShopUpdateJob] [c7a6150c-1ba7-46d5-9b37-530213f0d4a7] Performed DiscoApp::ShopUpdateJob (Job ID: c7a6150c-1ba7-46d5-9b37-530213f0d4a7) from Test(default) in 5.45ms [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:44.767485' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 11:59:44.768389', '2020-04-14 11:59:44.768389') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857550 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SubscriptionChangedJob] [80302232-c6d7-47a3-bf63-52e1479002b7] Performing DiscoApp::SubscriptionChangedJob (Job ID: 80302232-c6d7-47a3-bf63-52e1479002b7) from Test(default) enqueued at 2020-04-14T11:59:44Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SubscriptionChangedJob] [80302232-c6d7-47a3-bf63-52e1479002b7] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SubscriptionChangedJob] [80302232-c6d7-47a3-bf63-52e1479002b7] [DiscoApp::SendSubscriptionJob] [904d2312-6d6e-4c82-a7d6-ca9f72de8252] Performing DiscoApp::SendSubscriptionJob (Job ID: 904d2312-6d6e-4c82-a7d6-ca9f72de8252) from Test(default) enqueued at 2020-04-14T11:59:44Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SubscriptionChangedJob] [80302232-c6d7-47a3-bf63-52e1479002b7] [DiscoApp::SendSubscriptionJob] [904d2312-6d6e-4c82-a7d6-ca9f72de8252] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SubscriptionChangedJob] [80302232-c6d7-47a3-bf63-52e1479002b7] [DiscoApp::SendSubscriptionJob] [904d2312-6d6e-4c82-a7d6-ca9f72de8252] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SubscriptionChangedJob] [80302232-c6d7-47a3-bf63-52e1479002b7] [DiscoApp::SendSubscriptionJob] [904d2312-6d6e-4c82-a7d6-ca9f72de8252] Performed DiscoApp::SendSubscriptionJob (Job ID: 904d2312-6d6e-4c82-a7d6-ca9f72de8252) from Test(default) in 13.68ms [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SubscriptionChangedJob] [80302232-c6d7-47a3-bf63-52e1479002b7] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 904d2312-6d6e-4c82-a7d6-ca9f72de8252) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] [DiscoApp::SubscriptionChangedJob] [80302232-c6d7-47a3-bf63-52e1479002b7] Performed DiscoApp::SubscriptionChangedJob (Job ID: 80302232-c6d7-47a3-bf63-52e1479002b7) from Test(default) in 15.09ms [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 80302232-c6d7-47a3-bf63-52e1479002b7) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:44.800787' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d9a294b8-c564-4d31-b709-72bb35136c04] Performed DiscoApp::AppInstalledJob (Job ID: d9a294b8-c564-4d31-b709-72bb35136c04) from Test(default) in 64.76ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: d9a294b8-c564-4d31-b709-72bb35136c04) to Test(default) with arguments: #> DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:59:44.820321' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 512e1811-2ec5-41c4-81b9-14ee2fc72042) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 8ms (ActiveRecord: 1.3ms | Allocations: 2649) DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:44.828422' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:59:44.832734' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: e2c0825b-192d-4dd0-8c92-4c730f030fea) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.2ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.2ms | Allocations: 381)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:44.838440' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 661)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 11:59:44.844218' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 11:59:44.850224' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 1.2ms | Allocations: 310) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 1.0ms | Allocations: 98) Completed 200 OK in 491ms (Views: 487.4ms | ActiveRecord: 0.4ms | Allocations: 525359)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.7ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 11:59:45.370971' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 11:59:45.373639' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 418)  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:59:45.401566' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 0a90bc32-71cf-4d9c-8488-de52f6fa083b) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 0.9ms | Allocations: 2896)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:59:45.409296' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 9314da1c-39a1-4b5b-850c-c910d5109094) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 1.2ms | Allocations: 2068)  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [3fe2bcdc-aace-4947-a4cd-d9b86850865c] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 3fe2bcdc-aace-4947-a4cd-d9b86850865c) from Test(default) enqueued at 2020-04-14T11:59:45Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [3fe2bcdc-aace-4947-a4cd-d9b86850865c] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 3fe2bcdc-aace-4947-a4cd-d9b86850865c) from Test(default) in 51.33ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 3fe2bcdc-aace-4947-a4cd-d9b86850865c) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [8f8f77cf-c58c-452a-9fb7-f2c80dc3ee88] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 8f8f77cf-c58c-452a-9fb7-f2c80dc3ee88) from Test(default) enqueued at 2020-04-14T11:59:45Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [8f8f77cf-c58c-452a-9fb7-f2c80dc3ee88] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 8f8f77cf-c58c-452a-9fb7-f2c80dc3ee88) from Test(default) in 47.54ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 8f8f77cf-c58c-452a-9fb7-f2c80dc3ee88) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:59:45.552180' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] Performing DiscoApp::AppUninstalledJob (Job ID: c374c459-0004-4c14-9d3e-3b08ac8d4d57) from Test(default) enqueued at 2020-04-14T11:59:45Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 11:59:45.555762' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] [DiscoApp::SendSubscriptionJob] [964458bf-556e-4cab-bf9f-57ae3d954eba] Performing DiscoApp::SendSubscriptionJob (Job ID: 964458bf-556e-4cab-bf9f-57ae3d954eba) from Test(default) enqueued at 2020-04-14T11:59:45Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] [DiscoApp::SendSubscriptionJob] [964458bf-556e-4cab-bf9f-57ae3d954eba] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] [DiscoApp::SendSubscriptionJob] [964458bf-556e-4cab-bf9f-57ae3d954eba] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] [DiscoApp::SendSubscriptionJob] [964458bf-556e-4cab-bf9f-57ae3d954eba] Performed DiscoApp::SendSubscriptionJob (Job ID: 964458bf-556e-4cab-bf9f-57ae3d954eba) from Test(default) in 15.12ms [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 964458bf-556e-4cab-bf9f-57ae3d954eba) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] DiscoApp::Session Destroy (0.4ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 11:59:45.591189', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 11:59:45.593101' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [c374c459-0004-4c14-9d3e-3b08ac8d4d57] Performed DiscoApp::AppUninstalledJob (Job ID: c374c459-0004-4c14-9d3e-3b08ac8d4d57) from Test(default) in 39.56ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: c374c459-0004-4c14-9d3e-3b08ac8d4d57) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:59:45.597862' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] Performing DiscoApp::AppUninstalledJob (Job ID: 3f946542-bb9b-4113-86b6-49f06bdbc7e5) from Test(default) enqueued at 2020-04-14T11:59:45Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 11:59:45.602193' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] [DiscoApp::SendSubscriptionJob] [b092755d-a224-4fb5-993c-4f9276cdf4c2] Performing DiscoApp::SendSubscriptionJob (Job ID: b092755d-a224-4fb5-993c-4f9276cdf4c2) from Test(default) enqueued at 2020-04-14T11:59:45Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] [DiscoApp::SendSubscriptionJob] [b092755d-a224-4fb5-993c-4f9276cdf4c2] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] [DiscoApp::SendSubscriptionJob] [b092755d-a224-4fb5-993c-4f9276cdf4c2] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] [DiscoApp::SendSubscriptionJob] [b092755d-a224-4fb5-993c-4f9276cdf4c2] Performed DiscoApp::SendSubscriptionJob (Job ID: b092755d-a224-4fb5-993c-4f9276cdf4c2) from Test(default) in 13.45ms [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] Enqueued DiscoApp::SendSubscriptionJob (Job ID: b092755d-a224-4fb5-993c-4f9276cdf4c2) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] DiscoApp::Session Destroy (0.4ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 11:59:45.621586', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 11:59:45.623349' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [3f946542-bb9b-4113-86b6-49f06bdbc7e5] Performed DiscoApp::AppUninstalledJob (Job ID: 3f946542-bb9b-4113-86b6-49f06bdbc7e5) from Test(default) in 23.47ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 3f946542-bb9b-4113-86b6-49f06bdbc7e5) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.635459' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 7.8ms | Allocations: 3667) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 15ms (Views: 8.6ms | ActiveRecord: 2.3ms | Allocations: 8150)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.656277' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 414)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.662458' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 7ms (ActiveRecord: 2.1ms | Allocations: 2417) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.675956' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:45.685789' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:59:45.686892', '2020-04-14 11:59:45.686892', '2020-04-14 11:59:45.686437', '2020-05-12 11:59:45.686453', 9999, 28) RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 7eb2b2b3-1764-4379-bf5d-40ded30c79b7) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 10ms (ActiveRecord: 2.8ms | Allocations: 3052) DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.697805' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 11:59:45.700284' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 479)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.706639' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 3.5ms | Allocations: 2304) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 14) Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.8ms | Allocations: 5223)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.721625' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:45.728591' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:59:45.729491', '2020-04-14 11:59:45.729491', '2020-04-14 11:59:45.729098', '2020-05-12 11:59:45.729111', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 991c5da5-8248-4d2e-8ce1-3ed937b2f931) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 10ms (ActiveRecord: 2.6ms | Allocations: 4102) DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.738856' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 11:59:45.745843' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 11:59:45.747512', '2020-04-14 11:59:45.747512', '2020-04-14 11:59:45.747069', '2020-06-13 11:59:45.747085', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 5d19e389-cef3-4651-8852-9f8dad19d623) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 10ms (ActiveRecord: 2.9ms | Allocations: 4388) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.762365' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.1ms | Allocations: 432) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 8ms (Views: 2.8ms | ActiveRecord: 1.5ms | Allocations: 4433)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.778048' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.4ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 11:59:45.791444' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 10ms (ActiveRecord: 2.4ms | Allocations: 7056)  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.797282' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 215)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.803593' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 7ms (ActiveRecord: 1.4ms | Allocations: 5491)  (0.2ms) ROLLBACK  (0.3ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.819618' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 11:59:45.828720', '2020-04-14 11:59:45.828720') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 11:59:45.834750', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 13ms (ActiveRecord: 3.2ms | Allocations: 7540)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.840033' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 3ms (ActiveRecord: 0.8ms | Allocations: 1249)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.847941' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 4ms (ActiveRecord: 1.1ms | Allocations: 1900)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.859748' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 1630)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.868757' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 11:59:45.870377' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 480)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.876689' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 11:59:45.888485' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 11:59:45.894650' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 15ms (ActiveRecord: 3.6ms | Allocations: 11600) DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.5ms | Allocations: 591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 163)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.6ms | Allocations: 85) Completed 404 Not Found in 4ms (Views: 2.8ms | ActiveRecord: 0.2ms | Allocations: 1795)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 11:59:45.932461' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 11:59:45.945780' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.5ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 11:59:45.961960', '2020-04-14 11:59:45.961960') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 11:59:45.976467' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (1.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 11:59:46.003172' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 11:59:46.017524', '2020-04-14 11:59:46.017524') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 11:59:46.027805' WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:59:46.035232', '2020-04-14 11:59:46.035232') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 21  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.5ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:59:46.042454', '2020-04-14 11:59:46.042454') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 22  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:59:46.062260', '2020-04-14 11:59:46.062260') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 23  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 11:59:46.067859', '2020-04-14 11:59:46.067859') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 24  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6] Performing DiscoApp::SynchroniseUsersJob (Job ID: 4a5f548b-9be9-498a-b202-393b51834bf6) from Test(default) enqueued at 2020-04-14T11:59:46Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6] DiscoApp::User Load (0.4ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6] DiscoApp::User Create (0.4ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 11:59:46.103209', '2020-04-14 11:59:46.103209') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6] DiscoApp::User Update (0.4ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 11:59:46.104863' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 11:59:46.107287', '2020-04-14 11:59:46.107287') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 11:59:46.108339' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [4a5f548b-9be9-498a-b202-393b51834bf6] Performed DiscoApp::SynchroniseUsersJob (Job ID: 4a5f548b-9be9-498a-b202-393b51834bf6) from Test(default) in 18.99ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: 4a5f548b-9be9-498a-b202-393b51834bf6) to Test(default) with arguments: #> DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.5ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:59:46.124675', '2020-04-14 11:59:46.124675') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 19  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:59:46.131184', '2020-04-14 11:59:46.131184') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.4ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 20  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.4ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 20  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:59:46.140202', '2020-04-14 11:59:46.140202') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 21  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:59:46.144348', '2020-04-14 11:59:46.144348') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 22  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:59:46.151422', '2020-04-14 11:59:46.151422') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 025fefec-a365-42b1-a9b9-70a954ff9b0e) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 23 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.1ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 23 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 11:59:46.158020', '2020-04-14 11:59:46.158020') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 1b45869c-353b-4d98-a532-61610c1343e0) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.4ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 11:59:46.168026', '2020-04-14 11:59:46.168026', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 11:59:46.169560', '2020-04-14 11:59:46.169560') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 11:59:46.173306', '2020-04-14 11:59:46.173306', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 11:59:46.176223', '2020-04-14 11:59:46.176223', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [7edd9199-9b53-489d-9fdf-aee94b814667] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7edd9199-9b53-489d-9fdf-aee94b814667) from Test(default) enqueued at 2020-04-14T11:59:46Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [7edd9199-9b53-489d-9fdf-aee94b814667] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7edd9199-9b53-489d-9fdf-aee94b814667) from Test(default) in 3.78ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7edd9199-9b53-489d-9fdf-aee94b814667) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 19:59:46 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [6e2b97cf-6eb6-4d58-b334-e0355cd88478] Performing CartsUpdateJob (Job ID: 6e2b97cf-6eb6-4d58-b334-e0355cd88478) from Test(default) enqueued at 2020-04-14T11:59:46Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [6e2b97cf-6eb6-4d58-b334-e0355cd88478] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [6e2b97cf-6eb6-4d58-b334-e0355cd88478] Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [6e2b97cf-6eb6-4d58-b334-e0355cd88478]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [6e2b97cf-6eb6-4d58-b334-e0355cd88478] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 11:59:46.236099' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [6e2b97cf-6eb6-4d58-b334-e0355cd88478]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [6e2b97cf-6eb6-4d58-b334-e0355cd88478] Performed CartsUpdateJob (Job ID: 6e2b97cf-6eb6-4d58-b334-e0355cd88478) from Test(default) in 6.36ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: 6e2b97cf-6eb6-4d58-b334-e0355cd88478) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.2ms | Allocations: 6353) Cart Load (0.2ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 19:59:46 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [94b2dcc4-336b-4772-88a3-e598d1d0e7a4] Performing ProductsDeleteJob (Job ID: 94b2dcc4-336b-4772-88a3-e598d1d0e7a4) from Test(default) enqueued at 2020-04-14T11:59:46Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [94b2dcc4-336b-4772-88a3-e598d1d0e7a4] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [94b2dcc4-336b-4772-88a3-e598d1d0e7a4] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [94b2dcc4-336b-4772-88a3-e598d1d0e7a4]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [94b2dcc4-336b-4772-88a3-e598d1d0e7a4] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [94b2dcc4-336b-4772-88a3-e598d1d0e7a4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [94b2dcc4-336b-4772-88a3-e598d1d0e7a4] Performed ProductsDeleteJob (Job ID: 94b2dcc4-336b-4772-88a3-e598d1d0e7a4) from Test(default) in 2.35ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: 94b2dcc4-336b-4772-88a3-e598d1d0e7a4) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.1ms | Allocations: 1705)  (0.2ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 19:59:46 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [5da78874-650a-444a-a611-8732aa8dbaac] Performing ProductsUpdateJob (Job ID: 5da78874-650a-444a-a611-8732aa8dbaac) from Test(default) enqueued at 2020-04-14T11:59:46Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [5da78874-650a-444a-a611-8732aa8dbaac] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [5da78874-650a-444a-a611-8732aa8dbaac] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [5da78874-650a-444a-a611-8732aa8dbaac]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [5da78874-650a-444a-a611-8732aa8dbaac] Product Update (0.6ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 11:59:46.258765' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [5da78874-650a-444a-a611-8732aa8dbaac]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [5da78874-650a-444a-a611-8732aa8dbaac] Performed ProductsUpdateJob (Job ID: 5da78874-650a-444a-a611-8732aa8dbaac) from Test(default) in 5.04ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: 5da78874-650a-444a-a611-8732aa8dbaac) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.5ms | Allocations: 8495) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 19:59:46 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [0bb3d434-0636-45d2-8894-d66ac9042c22] Performing ProductsCreateJob (Job ID: 0bb3d434-0636-45d2-8894-d66ac9042c22) from Test(default) enqueued at 2020-04-14T11:59:46Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [0bb3d434-0636-45d2-8894-d66ac9042c22] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [0bb3d434-0636-45d2-8894-d66ac9042c22] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [0bb3d434-0636-45d2-8894-d66ac9042c22]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [0bb3d434-0636-45d2-8894-d66ac9042c22] Product Create (0.4ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 11:59:46.307534', '2020-04-14 11:59:46.307534') RETURNING "id" [ActiveJob] [ProductsCreateJob] [0bb3d434-0636-45d2-8894-d66ac9042c22]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [0bb3d434-0636-45d2-8894-d66ac9042c22] Performed ProductsCreateJob (Job ID: 0bb3d434-0636-45d2-8894-d66ac9042c22) from Test(default) in 7.0ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 0bb3d434-0636-45d2-8894-d66ac9042c22) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 45ms (Views: 0.3ms | ActiveRecord: 1.3ms | Allocations: 12386) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 11:59:46.320076' WHERE "products"."id" = 632910393  (0.1ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: d419a941-e4f2-47bd-83d0-a895d1e3e65d) to Test(default) with arguments: #>, #>, "widget_assets"  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.5ms | Allocations: 128)  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.5ms | Allocations: 92)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.5ms | Allocations: 115)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: e265e710-af74-445d-ae0d-f6591d5b919b) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.1ms | Allocations: 7)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.3ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 91775466-7016-48c2-b1a6-a6d933ba12eb) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: b5c0895e-863a-4478-b314-ea8963c3285f) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 0bf9f150-2d49-4d8b-8c7b-abb407f0ff46) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 6e62c78b-fe4d-4919-a6bd-2546da4f04b8) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 94abe6f4-ea69-4b55-8769-ce4300cbc53a) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.6ms | Allocations: 109) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.6ms | Allocations: 141)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 171)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 357)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.4ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 354)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:47.196388' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.5ms | Allocations: 106) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 9ms (Views: 2.5ms | ActiveRecord: 2.0ms | Allocations: 4683)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 11:59:47.211788' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 480)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 11:59:47.220030' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:47.227529' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.9ms | Allocations: 2625)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 11:59:47.240739' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:47.248103' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 911)  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:47.261179' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 11:59:47.262203' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.8ms | Allocations: 2591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 22) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 20) Completed 200 OK in 7ms (Views: 1.5ms | ActiveRecord: 1.6ms | Allocations: 4654)  (0.1ms) ROLLBACK  (0.3ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 11:59:47.287714' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 11:59:47.295125' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 11:59:47.296184' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 877)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 11:59:47.304759' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [ec30cbce-90dd-49f0-aca5-66a1c04b828e] Performing DiscoApp::SendSubscriptionJob (Job ID: ec30cbce-90dd-49f0-aca5-66a1c04b828e) from Test(default) enqueued at 2020-04-14T11:59:47Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [ec30cbce-90dd-49f0-aca5-66a1c04b828e] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [ec30cbce-90dd-49f0-aca5-66a1c04b828e] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [ec30cbce-90dd-49f0-aca5-66a1c04b828e] Performed DiscoApp::SendSubscriptionJob (Job ID: ec30cbce-90dd-49f0-aca5-66a1c04b828e) from Test(default) in 14.86ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: ec30cbce-90dd-49f0-aca5-66a1c04b828e) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.1ms) BEGIN  (1.0ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.9ms) COMMIT  (0.2ms) BEGIN Fixtures Load (3.2ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 12:00:20.850318', '2020-04-14 12:00:20.850318'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 12:00:20.854756', '2020-04-14 12:00:20.854756', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 12:00:20.854756', '2020-04-14 12:00:20.854756', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 12:00:20.859216', '2020-04-14 12:00:20.859216', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 12:00:20.859216', '2020-04-14 12:00:20.859216', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 12:00:20.861215', '2020-04-14 12:00:20.861215', DEFAULT, DEFAULT, '2020-04-07 12:00:20', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 12:00:20.861215', '2020-04-14 12:00:20.861215', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 12:00:20.863813', '2020-04-14 12:00:20.863813'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 12:00:20.865838', '2020-04-14 12:00:20.865838', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 12:00:20.868037', '2020-04-14 12:00:20.868037', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 12:00:20.868037', '2020-04-14 12:00:20.868037', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 12:00:20.868037', '2020-04-14 12:00:20.868037', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 12:00:20.868037', '2020-04-14 12:00:20.868037', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 12:00:20.868037', '2020-04-14 12:00:20.868037', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 12:00:20.868037', '2020-04-14 12:00:20.868037', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 12:00:20.872446', '2020-04-14 12:00:20.872446'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.9ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.6ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:20.948293', '2020-04-14 12:00:20.948293') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: ffaa1cef-e88f-45cb-b704-47cc44e85091) to Test(default) with arguments: #>, #>  (0.5ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:21.019222', '2020-04-14 12:00:21.019222') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: c2b4fb1c-0bbd-4c7b-a54b-ea0c3d5e7975) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.3ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 26 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 26 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:21.232852' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] Performing DiscoApp::AppInstalledJob (Job ID: b00f5537-c15c-46a3-a01b-dc822483561a) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:00:21.255210' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SynchroniseWebhooksJob] [9070fca7-8699-4154-87cf-33b09f1f485b] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 9070fca7-8699-4154-87cf-33b09f1f485b) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SynchroniseWebhooksJob] [9070fca7-8699-4154-87cf-33b09f1f485b] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 9070fca7-8699-4154-87cf-33b09f1f485b) from Test(default) in 14.38ms [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SynchroniseCarrierServiceJob] [63d7514f-84d5-40f0-ae82-8e5f087603e9] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 63d7514f-84d5-40f0-ae82-8e5f087603e9) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SynchroniseCarrierServiceJob] [63d7514f-84d5-40f0-ae82-8e5f087603e9] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 63d7514f-84d5-40f0-ae82-8e5f087603e9) from Test(default) in 4.64ms [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::ShopUpdateJob] [ed9b157b-b370-45c3-93bf-2665139a1dcd] Performing DiscoApp::ShopUpdateJob (Job ID: ed9b157b-b370-45c3-93bf-2665139a1dcd) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::ShopUpdateJob] [ed9b157b-b370-45c3-93bf-2665139a1dcd]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::ShopUpdateJob] [ed9b157b-b370-45c3-93bf-2665139a1dcd] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::ShopUpdateJob] [ed9b157b-b370-45c3-93bf-2665139a1dcd] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::ShopUpdateJob] [ed9b157b-b370-45c3-93bf-2665139a1dcd]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::ShopUpdateJob] [ed9b157b-b370-45c3-93bf-2665139a1dcd] Performed DiscoApp::ShopUpdateJob (Job ID: ed9b157b-b370-45c3-93bf-2665139a1dcd) from Test(default) in 6.23ms [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:21.296717' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a]  (0.4ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Subscription Create (0.7ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 12:00:21.323115', '2020-04-14 12:00:21.323115', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857542 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SubscriptionChangedJob] [3a936dfc-654e-4505-a438-67041d8ba5be] Performing DiscoApp::SubscriptionChangedJob (Job ID: 3a936dfc-654e-4505-a438-67041d8ba5be) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SubscriptionChangedJob] [3a936dfc-654e-4505-a438-67041d8ba5be] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SubscriptionChangedJob] [3a936dfc-654e-4505-a438-67041d8ba5be] [DiscoApp::SendSubscriptionJob] [ace8aba9-a1a4-4a30-965a-71405098d003] Performing DiscoApp::SendSubscriptionJob (Job ID: ace8aba9-a1a4-4a30-965a-71405098d003) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SubscriptionChangedJob] [3a936dfc-654e-4505-a438-67041d8ba5be] [DiscoApp::SendSubscriptionJob] [ace8aba9-a1a4-4a30-965a-71405098d003] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SubscriptionChangedJob] [3a936dfc-654e-4505-a438-67041d8ba5be] [DiscoApp::SendSubscriptionJob] [ace8aba9-a1a4-4a30-965a-71405098d003] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SubscriptionChangedJob] [3a936dfc-654e-4505-a438-67041d8ba5be] [DiscoApp::SendSubscriptionJob] [ace8aba9-a1a4-4a30-965a-71405098d003] Performed DiscoApp::SendSubscriptionJob (Job ID: ace8aba9-a1a4-4a30-965a-71405098d003) from Test(default) in 13.45ms [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SubscriptionChangedJob] [3a936dfc-654e-4505-a438-67041d8ba5be] Enqueued DiscoApp::SendSubscriptionJob (Job ID: ace8aba9-a1a4-4a30-965a-71405098d003) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] [DiscoApp::SubscriptionChangedJob] [3a936dfc-654e-4505-a438-67041d8ba5be] Performed DiscoApp::SubscriptionChangedJob (Job ID: 3a936dfc-654e-4505-a438-67041d8ba5be) from Test(default) in 16.16ms [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 3a936dfc-654e-4505-a438-67041d8ba5be) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:21.347587' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [b00f5537-c15c-46a3-a01b-dc822483561a] Performed DiscoApp::AppInstalledJob (Job ID: b00f5537-c15c-46a3-a01b-dc822483561a) from Test(default) in 108.07ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: b00f5537-c15c-46a3-a01b-dc822483561a) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:21.358642' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] Performing DiscoApp::AppInstalledJob (Job ID: 94b5d3ae-198b-43aa-ae39-fa49c43e6d9b) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:00:21.361477' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SynchroniseWebhooksJob] [4a9fc738-b0bf-4779-8893-282f4bfcb356] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 4a9fc738-b0bf-4779-8893-282f4bfcb356) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SynchroniseWebhooksJob] [4a9fc738-b0bf-4779-8893-282f4bfcb356] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 4a9fc738-b0bf-4779-8893-282f4bfcb356) from Test(default) in 13.77ms [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SynchroniseCarrierServiceJob] [d57528e2-7946-4715-a738-e10ea92e0a17] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: d57528e2-7946-4715-a738-e10ea92e0a17) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SynchroniseCarrierServiceJob] [d57528e2-7946-4715-a738-e10ea92e0a17] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: d57528e2-7946-4715-a738-e10ea92e0a17) from Test(default) in 3.84ms [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::ShopUpdateJob] [05fcc561-cd93-4561-8a5d-5ff25d6dbe50] Performing DiscoApp::ShopUpdateJob (Job ID: 05fcc561-cd93-4561-8a5d-5ff25d6dbe50) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::ShopUpdateJob] [05fcc561-cd93-4561-8a5d-5ff25d6dbe50]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::ShopUpdateJob] [05fcc561-cd93-4561-8a5d-5ff25d6dbe50] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::ShopUpdateJob] [05fcc561-cd93-4561-8a5d-5ff25d6dbe50] DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::ShopUpdateJob] [05fcc561-cd93-4561-8a5d-5ff25d6dbe50]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::ShopUpdateJob] [05fcc561-cd93-4561-8a5d-5ff25d6dbe50] Performed DiscoApp::ShopUpdateJob (Job ID: 05fcc561-cd93-4561-8a5d-5ff25d6dbe50) from Test(default) in 5.1ms [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:21.387267' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 12:00:21.388115', '2020-04-14 12:00:21.388115') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857543 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SubscriptionChangedJob] [a636addf-b6ce-44bb-bbb7-53b79771d741] Performing DiscoApp::SubscriptionChangedJob (Job ID: a636addf-b6ce-44bb-bbb7-53b79771d741) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SubscriptionChangedJob] [a636addf-b6ce-44bb-bbb7-53b79771d741] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SubscriptionChangedJob] [a636addf-b6ce-44bb-bbb7-53b79771d741] [DiscoApp::SendSubscriptionJob] [3d594398-ef5d-490a-bfdc-80803e144afb] Performing DiscoApp::SendSubscriptionJob (Job ID: 3d594398-ef5d-490a-bfdc-80803e144afb) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SubscriptionChangedJob] [a636addf-b6ce-44bb-bbb7-53b79771d741] [DiscoApp::SendSubscriptionJob] [3d594398-ef5d-490a-bfdc-80803e144afb] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SubscriptionChangedJob] [a636addf-b6ce-44bb-bbb7-53b79771d741] [DiscoApp::SendSubscriptionJob] [3d594398-ef5d-490a-bfdc-80803e144afb] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SubscriptionChangedJob] [a636addf-b6ce-44bb-bbb7-53b79771d741] [DiscoApp::SendSubscriptionJob] [3d594398-ef5d-490a-bfdc-80803e144afb] Performed DiscoApp::SendSubscriptionJob (Job ID: 3d594398-ef5d-490a-bfdc-80803e144afb) from Test(default) in 13.73ms [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SubscriptionChangedJob] [a636addf-b6ce-44bb-bbb7-53b79771d741] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 3d594398-ef5d-490a-bfdc-80803e144afb) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] [DiscoApp::SubscriptionChangedJob] [a636addf-b6ce-44bb-bbb7-53b79771d741] Performed DiscoApp::SubscriptionChangedJob (Job ID: a636addf-b6ce-44bb-bbb7-53b79771d741) from Test(default) in 14.96ms [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: a636addf-b6ce-44bb-bbb7-53b79771d741) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:21.407604' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [94b5d3ae-198b-43aa-ae39-fa49c43e6d9b] Performed DiscoApp::AppInstalledJob (Job ID: 94b5d3ae-198b-43aa-ae39-fa49c43e6d9b) from Test(default) in 48.22ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 94b5d3ae-198b-43aa-ae39-fa49c43e6d9b) to Test(default) with arguments: #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:21.419106' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] Performing DiscoApp::AppInstalledJob (Job ID: c3f1589c-c2eb-4593-a42a-6d0d78bdda68) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:00:21.423687' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SynchroniseWebhooksJob] [601685c1-e0ac-4dbd-a812-ea36bf28aee5] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 601685c1-e0ac-4dbd-a812-ea36bf28aee5) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SynchroniseWebhooksJob] [601685c1-e0ac-4dbd-a812-ea36bf28aee5] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 601685c1-e0ac-4dbd-a812-ea36bf28aee5) from Test(default) in 14.04ms [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SynchroniseCarrierServiceJob] [6967b72b-270b-4eb5-81e8-501bb6e9d6ac] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 6967b72b-270b-4eb5-81e8-501bb6e9d6ac) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SynchroniseCarrierServiceJob] [6967b72b-270b-4eb5-81e8-501bb6e9d6ac] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 6967b72b-270b-4eb5-81e8-501bb6e9d6ac) from Test(default) in 3.22ms [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::ShopUpdateJob] [f21a2837-0928-4599-b1d8-679bc0f138d2] Performing DiscoApp::ShopUpdateJob (Job ID: f21a2837-0928-4599-b1d8-679bc0f138d2) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::ShopUpdateJob] [f21a2837-0928-4599-b1d8-679bc0f138d2]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::ShopUpdateJob] [f21a2837-0928-4599-b1d8-679bc0f138d2] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::ShopUpdateJob] [f21a2837-0928-4599-b1d8-679bc0f138d2] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::ShopUpdateJob] [f21a2837-0928-4599-b1d8-679bc0f138d2]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::ShopUpdateJob] [f21a2837-0928-4599-b1d8-679bc0f138d2] Performed DiscoApp::ShopUpdateJob (Job ID: f21a2837-0928-4599-b1d8-679bc0f138d2) from Test(default) in 18.55ms [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:21.462829' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 12:00:21.463819', '2020-04-14 12:00:21.463819') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857544 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SubscriptionChangedJob] [576ed0c1-d1a7-4282-9d11-0f70547fcd80] Performing DiscoApp::SubscriptionChangedJob (Job ID: 576ed0c1-d1a7-4282-9d11-0f70547fcd80) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SubscriptionChangedJob] [576ed0c1-d1a7-4282-9d11-0f70547fcd80] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SubscriptionChangedJob] [576ed0c1-d1a7-4282-9d11-0f70547fcd80] [DiscoApp::SendSubscriptionJob] [c301ef75-9529-4ee7-bd1a-13e93afe02a8] Performing DiscoApp::SendSubscriptionJob (Job ID: c301ef75-9529-4ee7-bd1a-13e93afe02a8) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SubscriptionChangedJob] [576ed0c1-d1a7-4282-9d11-0f70547fcd80] [DiscoApp::SendSubscriptionJob] [c301ef75-9529-4ee7-bd1a-13e93afe02a8] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SubscriptionChangedJob] [576ed0c1-d1a7-4282-9d11-0f70547fcd80] [DiscoApp::SendSubscriptionJob] [c301ef75-9529-4ee7-bd1a-13e93afe02a8] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SubscriptionChangedJob] [576ed0c1-d1a7-4282-9d11-0f70547fcd80] [DiscoApp::SendSubscriptionJob] [c301ef75-9529-4ee7-bd1a-13e93afe02a8] Performed DiscoApp::SendSubscriptionJob (Job ID: c301ef75-9529-4ee7-bd1a-13e93afe02a8) from Test(default) in 13.56ms [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SubscriptionChangedJob] [576ed0c1-d1a7-4282-9d11-0f70547fcd80] Enqueued DiscoApp::SendSubscriptionJob (Job ID: c301ef75-9529-4ee7-bd1a-13e93afe02a8) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] [DiscoApp::SubscriptionChangedJob] [576ed0c1-d1a7-4282-9d11-0f70547fcd80] Performed DiscoApp::SubscriptionChangedJob (Job ID: 576ed0c1-d1a7-4282-9d11-0f70547fcd80) from Test(default) in 14.91ms [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 576ed0c1-d1a7-4282-9d11-0f70547fcd80) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:21.483634' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [c3f1589c-c2eb-4593-a42a-6d0d78bdda68] Performed DiscoApp::AppInstalledJob (Job ID: c3f1589c-c2eb-4593-a42a-6d0d78bdda68) from Test(default) in 62.51ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: c3f1589c-c2eb-4593-a42a-6d0d78bdda68) to Test(default) with arguments: #> DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [2d28f483-5c37-4358-8a20-4919ec502410] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 2d28f483-5c37-4358-8a20-4919ec502410) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [2d28f483-5c37-4358-8a20-4919ec502410] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 2d28f483-5c37-4358-8a20-4919ec502410) from Test(default) in 19.0ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 2d28f483-5c37-4358-8a20-4919ec502410) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [cd2fc4ee-09fc-4a6f-82d6-9f690512231a] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: cd2fc4ee-09fc-4a6f-82d6-9f690512231a) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [cd2fc4ee-09fc-4a6f-82d6-9f690512231a] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: cd2fc4ee-09fc-4a6f-82d6-9f690512231a) from Test(default) in 11.78ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: cd2fc4ee-09fc-4a6f-82d6-9f690512231a) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [0de34d22-654e-4c97-a06e-fa981d262fd2] Performing DiscoApp::SendSubscriptionJob (Job ID: 0de34d22-654e-4c97-a06e-fa981d262fd2) from Test(default) enqueued at 2020-04-14T12:00:21Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [0de34d22-654e-4c97-a06e-fa981d262fd2] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [0de34d22-654e-4c97-a06e-fa981d262fd2] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [0de34d22-654e-4c97-a06e-fa981d262fd2] Performed DiscoApp::SendSubscriptionJob (Job ID: 0de34d22-654e-4c97-a06e-fa981d262fd2) from Test(default) in 14.56ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 0de34d22-654e-4c97-a06e-fa981d262fd2) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:00:21.558995' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 4ms (ActiveRecord: 0.6ms | Allocations: 1227)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:21.572517' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: cf234f43-e88a-4453-9eff-88492ace24a7) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 1896) DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:21.577313' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:21.580830' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 2e569faf-0d48-4f7a-b9f6-ff3bd2d8e035) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 0.9ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.2ms | Allocations: 376)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:21.586571' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 2ms (ActiveRecord: 0.4ms | Allocations: 661)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:00:21.592379' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.9ms | Allocations: 310) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.8ms | Allocations: 98) Completed 200 OK in 539ms (Views: 522.4ms | ActiveRecord: 0.4ms | Allocations: 525361)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:22.153659' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: e240ea88-a596-42be-8f3f-1442b7538fa6) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 8ms (Views: 1.7ms | ActiveRecord: 1.2ms | Allocations: 2925)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 129)  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:22.164863' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 978b806f-5e3a-4c01-86a9-157308a04be9) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.8ms | Allocations: 2066)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:00:22 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [b5327c57-86b9-4b64-9740-1a41e915cfc4] Performing CartsUpdateJob (Job ID: b5327c57-86b9-4b64-9740-1a41e915cfc4) from Test(default) enqueued at 2020-04-14T12:00:22Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [b5327c57-86b9-4b64-9740-1a41e915cfc4] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [b5327c57-86b9-4b64-9740-1a41e915cfc4] Cart Load (0.4ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [b5327c57-86b9-4b64-9740-1a41e915cfc4]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [b5327c57-86b9-4b64-9740-1a41e915cfc4] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 12:00:22.225966' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [b5327c57-86b9-4b64-9740-1a41e915cfc4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [b5327c57-86b9-4b64-9740-1a41e915cfc4] Performed CartsUpdateJob (Job ID: b5327c57-86b9-4b64-9740-1a41e915cfc4) from Test(default) in 11.62ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: b5327c57-86b9-4b64-9740-1a41e915cfc4) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 1.3ms | Allocations: 6354) Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 12:00:22.249850' WHERE "products"."id" = 632910393  (0.2ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (1.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:00:22 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [e7bfb209-98ba-4957-a807-64322fe4d8ca] Performing ProductsDeleteJob (Job ID: e7bfb209-98ba-4957-a807-64322fe4d8ca) from Test(default) enqueued at 2020-04-14T12:00:22Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [e7bfb209-98ba-4957-a807-64322fe4d8ca] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [e7bfb209-98ba-4957-a807-64322fe4d8ca] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [e7bfb209-98ba-4957-a807-64322fe4d8ca]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [e7bfb209-98ba-4957-a807-64322fe4d8ca] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [e7bfb209-98ba-4957-a807-64322fe4d8ca]  (0.6ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [e7bfb209-98ba-4957-a807-64322fe4d8ca] Performed ProductsDeleteJob (Job ID: e7bfb209-98ba-4957-a807-64322fe4d8ca) from Test(default) in 4.65ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: e7bfb209-98ba-4957-a807-64322fe4d8ca) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 13ms (Views: 0.3ms | ActiveRecord: 1.5ms | Allocations: 2164)  (0.3ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.5ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:00:22 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [e6a5506f-8d36-4755-884a-2f8544895bf2] Performing ProductsUpdateJob (Job ID: e6a5506f-8d36-4755-884a-2f8544895bf2) from Test(default) enqueued at 2020-04-14T12:00:22Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [e6a5506f-8d36-4755-884a-2f8544895bf2] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [e6a5506f-8d36-4755-884a-2f8544895bf2] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [e6a5506f-8d36-4755-884a-2f8544895bf2]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [e6a5506f-8d36-4755-884a-2f8544895bf2] Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 12:00:22.303898' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [e6a5506f-8d36-4755-884a-2f8544895bf2]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [e6a5506f-8d36-4755-884a-2f8544895bf2] Performed ProductsUpdateJob (Job ID: e6a5506f-8d36-4755-884a-2f8544895bf2) from Test(default) in 10.66ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: e6a5506f-8d36-4755-884a-2f8544895bf2) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 20ms (Views: 0.3ms | ActiveRecord: 1.3ms | Allocations: 8449) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:00:22 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [53cbf1d5-9e29-4909-9a0f-24f8de430297] Performing ProductsCreateJob (Job ID: 53cbf1d5-9e29-4909-9a0f-24f8de430297) from Test(default) enqueued at 2020-04-14T12:00:22Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [53cbf1d5-9e29-4909-9a0f-24f8de430297] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [53cbf1d5-9e29-4909-9a0f-24f8de430297] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [53cbf1d5-9e29-4909-9a0f-24f8de430297]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [53cbf1d5-9e29-4909-9a0f-24f8de430297] Product Create (0.6ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 12:00:22.332783', '2020-04-14 12:00:22.332783') RETURNING "id" [ActiveJob] [ProductsCreateJob] [53cbf1d5-9e29-4909-9a0f-24f8de430297]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [53cbf1d5-9e29-4909-9a0f-24f8de430297] Performed ProductsCreateJob (Job ID: 53cbf1d5-9e29-4909-9a0f-24f8de430297) from Test(default) in 22.5ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 53cbf1d5-9e29-4909-9a0f-24f8de430297) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 34ms (Views: 1.3ms | ActiveRecord: 1.5ms | Allocations: 12388) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.5ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:22.377117', '2020-04-14 12:00:22.377117') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 25  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:22.384163', '2020-04-14 12:00:22.384163') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 26  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:22.414098', '2020-04-14 12:00:22.414098') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 27  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:22.418917', '2020-04-14 12:00:22.418917') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 28  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:00:22.443943' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 617)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:22.451160' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.459268' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:00:22.460622' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.6ms | Allocations: 2631)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.472348' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 12:00:22.473597' WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 1.0ms | Allocations: 912)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.3ms | Allocations: 119) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 21) Completed 200 OK in 15ms (Views: 1.9ms | ActiveRecord: 1.8ms | Allocations: 9975)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:00:22.505900' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:00:22.512692' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.520559' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 877)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.531096' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.7ms | Allocations: 2591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.542107' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.0ms | Allocations: 13) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 1.4ms | Allocations: 4297)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:22.553990' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.5ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 224)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.3ms | Allocations: 591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.7ms | Allocations: 85) Completed 404 Not Found in 4ms (Views: 2.9ms | ActiveRecord: 0.4ms | Allocations: 1801)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 163)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.5ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:00:22.595273', '2020-04-14 12:00:22.595273', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 12:00:22.596897', '2020-04-14 12:00:22.596897') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:00:22.601763', '2020-04-14 12:00:22.601763', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:00:22.604897', '2020-04-14 12:00:22.604897', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.613668' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 5ms (ActiveRecord: 1.6ms | Allocations: 1383)  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.624326' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 215)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.631844' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 10ms (ActiveRecord: 1.6ms | Allocations: 7150)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.651489' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.5ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 12:00:22.665216', '2020-04-14 12:00:22.665216') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 12:00:22.674117', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 18ms (ActiveRecord: 4.2ms | Allocations: 7903)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.681969' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.5ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:00:22.701257' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 15ms (ActiveRecord: 4.0ms | Allocations: 5679)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.711848' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.2ms | Allocations: 444) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 11ms (Views: 3.3ms | ActiveRecord: 2.0ms | Allocations: 4317)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.734225' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 12:00:22.736790' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 480)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.746179' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 2.0ms | Allocations: 1630)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.759547' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:00:22.771801' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.777610' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 14ms (ActiveRecord: 3.2ms | Allocations: 11600) DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:22.783791' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 5ms (ActiveRecord: 1.4ms | Allocations: 1900)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:22.795641' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] Performing DiscoApp::AppUninstalledJob (Job ID: 8e8776f0-9d26-4371-880e-d285ca1a221c) from Test(default) enqueued at 2020-04-14T12:00:22Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:00:22.798932' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] [DiscoApp::SendSubscriptionJob] [3e637e0b-aa4e-48ed-b229-d34f8c4e6a4e] Performing DiscoApp::SendSubscriptionJob (Job ID: 3e637e0b-aa4e-48ed-b229-d34f8c4e6a4e) from Test(default) enqueued at 2020-04-14T12:00:22Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] [DiscoApp::SendSubscriptionJob] [3e637e0b-aa4e-48ed-b229-d34f8c4e6a4e] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] [DiscoApp::SendSubscriptionJob] [3e637e0b-aa4e-48ed-b229-d34f8c4e6a4e] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] [DiscoApp::SendSubscriptionJob] [3e637e0b-aa4e-48ed-b229-d34f8c4e6a4e] Performed DiscoApp::SendSubscriptionJob (Job ID: 3e637e0b-aa4e-48ed-b229-d34f8c4e6a4e) from Test(default) in 14.51ms [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 3e637e0b-aa4e-48ed-b229-d34f8c4e6a4e) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 12:00:22.818352', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:00:22.820335' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8e8776f0-9d26-4371-880e-d285ca1a221c] Performed DiscoApp::AppUninstalledJob (Job ID: 8e8776f0-9d26-4371-880e-d285ca1a221c) from Test(default) in 23.51ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 8e8776f0-9d26-4371-880e-d285ca1a221c) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:22.826208' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] Performing DiscoApp::AppUninstalledJob (Job ID: d07005eb-118a-4cb6-ae98-64312f729c53) from Test(default) enqueued at 2020-04-14T12:00:22Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:00:22.829130' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] [DiscoApp::SendSubscriptionJob] [2db2c36b-3585-4e9e-b0f1-6e34a5910618] Performing DiscoApp::SendSubscriptionJob (Job ID: 2db2c36b-3585-4e9e-b0f1-6e34a5910618) from Test(default) enqueued at 2020-04-14T12:00:22Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] [DiscoApp::SendSubscriptionJob] [2db2c36b-3585-4e9e-b0f1-6e34a5910618] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] [DiscoApp::SendSubscriptionJob] [2db2c36b-3585-4e9e-b0f1-6e34a5910618] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] [DiscoApp::SendSubscriptionJob] [2db2c36b-3585-4e9e-b0f1-6e34a5910618] Performed DiscoApp::SendSubscriptionJob (Job ID: 2db2c36b-3585-4e9e-b0f1-6e34a5910618) from Test(default) in 13.34ms [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 2db2c36b-3585-4e9e-b0f1-6e34a5910618) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 12:00:22.847166', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:00:22.848899' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [d07005eb-118a-4cb6-ae98-64312f729c53] Performed DiscoApp::AppUninstalledJob (Job ID: d07005eb-118a-4cb6-ae98-64312f729c53) from Test(default) in 21.59ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: d07005eb-118a-4cb6-ae98-64312f729c53) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:22.855676', '2020-04-14 12:00:22.855676') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: b7880212-bdcf-4b3c-8fc2-3b02b3ec0c27) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:22.862200', '2020-04-14 12:00:22.862200') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 9f8bd46b-067d-4fd4-8096-8bb4475dcad7) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 30 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 30 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9] Performing DiscoApp::SynchroniseUsersJob (Job ID: 7f4a1d5c-80ce-4873-9323-d19d699b02e9) from Test(default) enqueued at 2020-04-14T12:00:22Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9] DiscoApp::User Load (0.4ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 12:00:22.885929', '2020-04-14 12:00:22.885929') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 12:00:22.887212' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 12:00:22.888844', '2020-04-14 12:00:22.888844') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 12:00:22.889987' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [7f4a1d5c-80ce-4873-9323-d19d699b02e9] Performed DiscoApp::SynchroniseUsersJob (Job ID: 7f4a1d5c-80ce-4873-9323-d19d699b02e9) from Test(default) in 18.39ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: 7f4a1d5c-80ce-4873-9323-d19d699b02e9) to Test(default) with arguments: #> DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.8ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:22.920281' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:22.920281', '2020-04-14 12:00:22.920281', '2020-04-14 12:00:22.920281', '2020-05-12 12:00:22.920281', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d7042058-18ca-4e79-b981-912f9e42f0e2) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:22.928500' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:22.928500', '2020-04-14 12:00:22.928500', '2020-04-14 12:00:22.928500', '2020-06-13 12:00:22.928500', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b445dda9-a054-43d0-bf93-1b9bec375556) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:22.937175' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 12:00:22.937175', '2020-04-14 12:00:22.937175') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: f6a06065-e082-494e-9f9c-f720cc85d28a) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:22.943052' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:22.943052', '2020-04-14 12:00:22.943052', '2020-04-14 12:00:22.943052', '2020-05-12 12:00:22.943052', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d36489e5-f069-47d4-8285-678ed2a8951a) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:22.952691' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:22.952691', '2020-04-14 12:00:22.952691', '2020-04-14 12:00:22.952691', '2020-05-12 12:00:22.952691', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: f1a0dfc5-f555-47e7-9c61-0317abe5af1b) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857549 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857549 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:22.962912' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:22.962912', '2020-04-14 12:00:22.962912', '2020-04-14 12:00:22.962912', '2020-05-12 12:00:22.962912', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: cd9eacaf-075a-42e5-99fd-a258e22fdca7) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 12:00:22.992458' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 12:00:22.995451' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:23.001189', '2020-04-14 12:00:23.001189') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 27  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:23.007441', '2020-04-14 12:00:23.007441') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 28  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:23.011528', '2020-04-14 12:00:23.011528') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 29  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:23.015433', '2020-04-14 12:00:23.015433') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 30  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 30  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:23.028718' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:23.036709' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:23.038288', '2020-04-14 12:00:23.038288', '2020-04-14 12:00:23.037863', '2020-06-13 12:00:23.037877', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: e034b381-e505-490a-9133-7729a1738ac7) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 10ms (ActiveRecord: 2.6ms | Allocations: 4546) DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:23.046865' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 8.6ms | Allocations: 3612) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 15ms (Views: 9.4ms | ActiveRecord: 2.5ms | Allocations: 7950)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:23.067158' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 2.8ms | Allocations: 2304) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 14) Completed 200 OK in 7ms (Views: 3.9ms | ActiveRecord: 1.2ms | Allocations: 5223)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:23.081417' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:23.090175' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:23.091127', '2020-04-14 12:00:23.091127', '2020-04-14 12:00:23.090711', '2020-05-12 12:00:23.090723', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 30073ce5-fb04-4f3c-8abf-e37335567036) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 8ms (ActiveRecord: 1.8ms | Allocations: 3051) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:23.099461' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 7ms (ActiveRecord: 2.1ms | Allocations: 2415) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:23.112786' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 12:00:23.114507' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 479)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:23.121297' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 214)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:23.127736' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:23.134553' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:23.135493', '2020-04-14 12:00:23.135493', '2020-04-14 12:00:23.135059', '2020-05-12 12:00:23.135074', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d30bb4c3-9fed-4ae2-87d7-de8fef38fb53) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 9ms (ActiveRecord: 2.1ms | Allocations: 4102) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [e336dbc1-06dd-4577-bb51-04c7907cf05c] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: e336dbc1-06dd-4577-bb51-04c7907cf05c) from Test(default) enqueued at 2020-04-14T12:00:23Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [e336dbc1-06dd-4577-bb51-04c7907cf05c] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: e336dbc1-06dd-4577-bb51-04c7907cf05c) from Test(default) in 3.8ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: e336dbc1-06dd-4577-bb51-04c7907cf05c) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 171)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 357)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.4ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 12:00:23.182167', '2020-04-14 12:00:23.182167') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:00:23.198101' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:00:23.214425' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 12:00:23.277425', '2020-04-14 12:00:23.277425') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.5ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:00:23.288161' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:00:23.298438' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:00:23.314256' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 7843783b-e443-4cc5-b2be-db58ca1a6c7e) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 47cc8354-e58f-4f4c-901e-782a88e22b4e) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 1.9ms | Allocations: 118)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.5ms | Allocations: 125)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: fd312671-2631-4e7d-a5d4-4e7ad427c24f) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.4ms | Allocations: 109) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.5ms | Allocations: 141)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.4ms) ROLLBACK  (0.4ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.1ms | Allocations: 7)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.1ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: b7700171-52da-43ff-883c-b0c122fd6573) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.5ms | Allocations: 92)  (0.3ms) ROLLBACK  (0.3ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: afcada80-a35d-468f-a5ce-f9ac413e830d) to Test(default) with arguments: #>, #>, "widget_assets"  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: e3337c70-d9b6-4394-bbad-6a02d93cbc9b) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: d44d1995-5cfa-45d8-af89-07666a607189) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.2ms) BEGIN  (1.1ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN Fixtures Load (2.5ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 12:00:51.193820', '2020-04-14 12:00:51.193820'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 12:00:51.199293', '2020-04-14 12:00:51.199293', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 12:00:51.199293', '2020-04-14 12:00:51.199293', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 12:00:51.205393', '2020-04-14 12:00:51.205393', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 12:00:51.205393', '2020-04-14 12:00:51.205393', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 12:00:51.208253', '2020-04-14 12:00:51.208253', DEFAULT, DEFAULT, '2020-04-07 12:00:51', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 12:00:51.208253', '2020-04-14 12:00:51.208253', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 12:00:51.211293', '2020-04-14 12:00:51.211293'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 12:00:51.214083', '2020-04-14 12:00:51.214083', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 12:00:51.216825', '2020-04-14 12:00:51.216825', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 12:00:51.216825', '2020-04-14 12:00:51.216825', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 12:00:51.216825', '2020-04-14 12:00:51.216825', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 12:00:51.216825', '2020-04-14 12:00:51.216825', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 12:00:51.216825', '2020-04-14 12:00:51.216825', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 12:00:51.216825', '2020-04-14 12:00:51.216825', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 12:00:51.222089', '2020-04-14 12:00:51.222089'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.7ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.3ms) COMMIT  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.6ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:51.283780', '2020-04-14 12:00:51.283780') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: e8e50d68-04ee-48e9-a4bb-11da8083a9ea) to Test(default) with arguments: #>, #>  (0.4ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:51.353352', '2020-04-14 12:00:51.353352') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 5c60d5aa-9e20-42c1-a1c6-fe57958d747b) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.3ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 32 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.1ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 32 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.7ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:00:51.368741', '2020-04-14 12:00:51.368741', 605094243) RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 12:00:51.370982', '2020-04-14 12:00:51.370982') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.5ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.4ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:00:51.377553', '2020-04-14 12:00:51.377553', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.3ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:00:51.380441', '2020-04-14 12:00:51.380441', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 3ms (ActiveRecord: 0.0ms | Allocations: 1096)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 5) Completed 200 OK in 3ms (Views: 3.2ms | ActiveRecord: 0.0ms | Allocations: 1345)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 50874ac4-79fb-49b6-b42e-0441c60cdca0) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: fdea3209-8dad-41ce-944e-fc57c36856f4) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.8ms | Allocations: 321)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 6d31da06-d45e-477e-b112-5fd86f48072e) to Test(default) with arguments: #>, #>, "widget_assets"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.3ms | Allocations: 116)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 6309cfc9-5012-4821-bfb9-8d77cc07c954) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.3ms | Allocations: 117)  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.6ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.4ms) ROLLBACK  (0.3ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 5eb95101-65b1-4960-a237-5dba6384a557) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 2d2c61df-d7c6-4e93-9321-3ab09b0b8e5b) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 7b188971-304c-4a7f-89e5-8824121c9177) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.4ms | Allocations: 109) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.3ms | Allocations: 141)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:00:52 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [b2295632-c317-4173-a093-7c015cdda4b3] Performing ProductsUpdateJob (Job ID: b2295632-c317-4173-a093-7c015cdda4b3) from Test(default) enqueued at 2020-04-14T12:00:52Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [b2295632-c317-4173-a093-7c015cdda4b3] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [b2295632-c317-4173-a093-7c015cdda4b3] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [b2295632-c317-4173-a093-7c015cdda4b3]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [b2295632-c317-4173-a093-7c015cdda4b3] Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 12:00:52.168816' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [b2295632-c317-4173-a093-7c015cdda4b3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [b2295632-c317-4173-a093-7c015cdda4b3] Performed ProductsUpdateJob (Job ID: b2295632-c317-4173-a093-7c015cdda4b3) from Test(default) in 13.16ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: b2295632-c317-4173-a093-7c015cdda4b3) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 18ms (Views: 0.5ms | ActiveRecord: 1.3ms | Allocations: 16495) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.3ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:00:52 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4] Performing CartsUpdateJob (Job ID: d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4) from Test(default) enqueued at 2020-04-14T12:00:52Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4] Cart Load (0.2ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 12:00:52.185632' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4] Performed CartsUpdateJob (Job ID: d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4) from Test(default) in 6.19ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: d185e490-3a3d-4d93-ad2f-bb4b3eaf6db4) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.0ms | Allocations: 6342) Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:00:52 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [a2972c9c-4642-41ec-9b17-2c384e86dc8d] Performing ProductsDeleteJob (Job ID: a2972c9c-4642-41ec-9b17-2c384e86dc8d) from Test(default) enqueued at 2020-04-14T12:00:52Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [a2972c9c-4642-41ec-9b17-2c384e86dc8d] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [a2972c9c-4642-41ec-9b17-2c384e86dc8d] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [a2972c9c-4642-41ec-9b17-2c384e86dc8d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [a2972c9c-4642-41ec-9b17-2c384e86dc8d] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [a2972c9c-4642-41ec-9b17-2c384e86dc8d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [a2972c9c-4642-41ec-9b17-2c384e86dc8d] Performed ProductsDeleteJob (Job ID: a2972c9c-4642-41ec-9b17-2c384e86dc8d) from Test(default) in 2.64ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: a2972c9c-4642-41ec-9b17-2c384e86dc8d) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.3ms | Allocations: 1707)  (0.3ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 Product Update (0.5ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 12:00:52.225821' WHERE "products"."id" = 632910393  (0.3ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:00:52 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [ba04711f-40d6-4f4b-aa30-81dace98a345] Performing ProductsCreateJob (Job ID: ba04711f-40d6-4f4b-aa30-81dace98a345) from Test(default) enqueued at 2020-04-14T12:00:52Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [ba04711f-40d6-4f4b-aa30-81dace98a345] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [ba04711f-40d6-4f4b-aa30-81dace98a345] Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [ba04711f-40d6-4f4b-aa30-81dace98a345]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [ba04711f-40d6-4f4b-aa30-81dace98a345] Product Create (0.6ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 12:00:52.239823', '2020-04-14 12:00:52.239823') RETURNING "id" [ActiveJob] [ProductsCreateJob] [ba04711f-40d6-4f4b-aa30-81dace98a345]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [ba04711f-40d6-4f4b-aa30-81dace98a345] Performed ProductsCreateJob (Job ID: ba04711f-40d6-4f4b-aa30-81dace98a345) from Test(default) in 7.82ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: ba04711f-40d6-4f4b-aa30-81dace98a345) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 2.0ms | Allocations: 12386) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3] Performing DiscoApp::SynchroniseUsersJob (Job ID: b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3) from Test(default) enqueued at 2020-04-14T12:00:52Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3] DiscoApp::User Load (0.4ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 12:00:52.266025', '2020-04-14 12:00:52.266025') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 12:00:52.267359' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 12:00:52.269279', '2020-04-14 12:00:52.269279') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 12:00:52.270562' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3] Performed DiscoApp::SynchroniseUsersJob (Job ID: b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3) from Test(default) in 17.84ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: b6dea00a-1e60-4c5a-b7fd-e4bc05c016c3) to Test(default) with arguments: #> DiscoApp::User Load (0.3ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 12:00:52.291376' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 12:00:52.294064' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:52.298818', '2020-04-14 12:00:52.298818') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 33  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.4ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:52.305660', '2020-04-14 12:00:52.305660') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 34  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:52.310344', '2020-04-14 12:00:52.310344') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 35  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:00:52.314551', '2020-04-14 12:00:52.314551') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 36  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 36  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:00:52.328960' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 4ms (ActiveRecord: 0.4ms | Allocations: 1073)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:52.340780' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 89010bf6-7fe7-451f-b11f-a755fe3f8695) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 5ms (ActiveRecord: 1.1ms | Allocations: 2387) DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:52.345742' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 661)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:00:52.351331' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.4ms | Allocations: 89) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.4ms | Allocations: 98) Completed 200 OK in 437ms (Views: 433.7ms | ActiveRecord: 0.8ms | Allocations: 523959)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:52.794131' WHERE "disco_app_shops"."id" = 605094243  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:52.799090' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 0d402625-2abc-4ad6-a216-86049d9820c2) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.4ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.2ms | Allocations: 376)  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:52.818239', '2020-04-14 12:00:52.818239') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: c13924b7-dd1c-4065-80c1-aec632c74466) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:52.823589', '2020-04-14 12:00:52.823589') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: cd69891e-4042-4378-a99a-08d198dbbb3f) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.5ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 32 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.4ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 32 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:52.833601' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:52.833601', '2020-04-14 12:00:52.833601', '2020-04-14 12:00:52.833601', '2020-05-12 12:00:52.833601', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 1a2f0160-b552-448f-9dcb-3ee576af1bb9) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:52.849340' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 12:00:52.849340', '2020-04-14 12:00:52.849340') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: ec9882dc-cfb2-4842-ada2-74ce47f95116) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:52.855395' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:52.855395', '2020-04-14 12:00:52.855395', '2020-04-14 12:00:52.855395', '2020-05-12 12:00:52.855395', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 18d74f64-42cd-43d2-b7ed-4eddbf338edf) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (1.0ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:52.869294' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:52.869294', '2020-04-14 12:00:52.869294', '2020-04-14 12:00:52.869294', '2020-05-12 12:00:52.869294', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 7b32840b-d571-40e1-8565-4c3c95bb406f) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:52.877103' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.8ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:52.877103', '2020-04-14 12:00:52.877103', '2020-04-14 12:00:52.877103', '2020-06-13 12:00:52.877103', 8999, 1, 60) RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: ac4f6358-a3a9-4dea-bb17-df803d972262) to Test(default) with arguments: #>, #>  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.6ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:52.892204' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.4ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.5ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:52.892204', '2020-04-14 12:00:52.892204', '2020-04-14 12:00:52.892204', '2020-05-12 12:00:52.892204', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: fc4fa639-871a-43f8-9fa9-d7164d7de670) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857547 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857547 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:52.908041' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] Performing DiscoApp::AppUninstalledJob (Job ID: 46fc4a6d-aacd-4b0a-812a-05aee84ab919) from Test(default) enqueued at 2020-04-14T12:00:52Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:00:52.912705' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] [DiscoApp::SendSubscriptionJob] [aa86019b-bf78-4a80-b065-e2289fedd94a] Performing DiscoApp::SendSubscriptionJob (Job ID: aa86019b-bf78-4a80-b065-e2289fedd94a) from Test(default) enqueued at 2020-04-14T12:00:52Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] [DiscoApp::SendSubscriptionJob] [aa86019b-bf78-4a80-b065-e2289fedd94a] DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] [DiscoApp::SendSubscriptionJob] [aa86019b-bf78-4a80-b065-e2289fedd94a] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] [DiscoApp::SendSubscriptionJob] [aa86019b-bf78-4a80-b065-e2289fedd94a] Performed DiscoApp::SendSubscriptionJob (Job ID: aa86019b-bf78-4a80-b065-e2289fedd94a) from Test(default) in 158.62ms [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] Enqueued DiscoApp::SendSubscriptionJob (Job ID: aa86019b-bf78-4a80-b065-e2289fedd94a) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] DiscoApp::Session Destroy (0.4ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 12:00:53.078953', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:00:53.080962' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [46fc4a6d-aacd-4b0a-812a-05aee84ab919] Performed DiscoApp::AppUninstalledJob (Job ID: 46fc4a6d-aacd-4b0a-812a-05aee84ab919) from Test(default) in 170.53ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 46fc4a6d-aacd-4b0a-812a-05aee84ab919) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:53.086185' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] Performing DiscoApp::AppUninstalledJob (Job ID: 47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:00:53.089132' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] [DiscoApp::SendSubscriptionJob] [d68aaf64-d7ca-46ac-8867-f0165bbfb186] Performing DiscoApp::SendSubscriptionJob (Job ID: d68aaf64-d7ca-46ac-8867-f0165bbfb186) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] [DiscoApp::SendSubscriptionJob] [d68aaf64-d7ca-46ac-8867-f0165bbfb186] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] [DiscoApp::SendSubscriptionJob] [d68aaf64-d7ca-46ac-8867-f0165bbfb186] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] [DiscoApp::SendSubscriptionJob] [d68aaf64-d7ca-46ac-8867-f0165bbfb186] Performed DiscoApp::SendSubscriptionJob (Job ID: d68aaf64-d7ca-46ac-8867-f0165bbfb186) from Test(default) in 14.15ms [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] Enqueued DiscoApp::SendSubscriptionJob (Job ID: d68aaf64-d7ca-46ac-8867-f0165bbfb186) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 12:00:53.108278', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:00:53.109993' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4] Performed DiscoApp::AppUninstalledJob (Job ID: 47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4) from Test(default) in 22.82ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 47e7a59f-6a41-4689-b6ea-5f3a2fa4d6f4) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:00:53.121153' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 681)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.130090' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.8ms | Allocations: 2635)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.142815' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 912)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:00:53.154708' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 479)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 479)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:00:53.165497' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.171399' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.3ms | Allocations: 110) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 8ms (Views: 2.5ms | ActiveRecord: 1.8ms | Allocations: 4834)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:53.184932' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.193153' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 12:00:53.194626' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.9ms | Allocations: 877)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:53.204591' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.5ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.1ms | Allocations: 22) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.1ms | Allocations: 20) Completed 200 OK in 22ms (Views: 2.3ms | ActiveRecord: 3.1ms | Allocations: 9611)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 224)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.244792' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:00:53.246488' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 10ms (ActiveRecord: 2.5ms | Allocations: 2591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:53.261766', '2020-04-14 12:00:53.261766') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 33  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:53.289864', '2020-04-14 12:00:53.289864') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 34  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:53.296498', '2020-04-14 12:00:53.296498') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 35  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:00:53.302561', '2020-04-14 12:00:53.302561') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 36  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [57cb5ab0-2dff-43bd-93ca-12f915c8d26b] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 57cb5ab0-2dff-43bd-93ca-12f915c8d26b) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [57cb5ab0-2dff-43bd-93ca-12f915c8d26b] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 57cb5ab0-2dff-43bd-93ca-12f915c8d26b) from Test(default) in 37.28ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 57cb5ab0-2dff-43bd-93ca-12f915c8d26b) to Test(default) with arguments: #>  (0.4ms) ROLLBACK  (0.3ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [d71efab3-6c59-4fea-b674-c5545c889b21] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: d71efab3-6c59-4fea-b674-c5545c889b21) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [d71efab3-6c59-4fea-b674-c5545c889b21] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: d71efab3-6c59-4fea-b674-c5545c889b21) from Test(default) in 28.76ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: d71efab3-6c59-4fea-b674-c5545c889b21) to Test(default) with arguments: #>  (0.4ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.4ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.5ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:53.472410' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] Performing DiscoApp::AppInstalledJob (Job ID: d02a4b58-bb94-4690-a294-1c9cc5485b6d) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:00:53.477504' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SynchroniseWebhooksJob] [95b87407-f5d5-4304-aa2a-0ed74faba1b4] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 95b87407-f5d5-4304-aa2a-0ed74faba1b4) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SynchroniseWebhooksJob] [95b87407-f5d5-4304-aa2a-0ed74faba1b4] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 95b87407-f5d5-4304-aa2a-0ed74faba1b4) from Test(default) in 13.39ms [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SynchroniseCarrierServiceJob] [5803ea98-5f04-40c9-910e-63ccf659ff07] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 5803ea98-5f04-40c9-910e-63ccf659ff07) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SynchroniseCarrierServiceJob] [5803ea98-5f04-40c9-910e-63ccf659ff07] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 5803ea98-5f04-40c9-910e-63ccf659ff07) from Test(default) in 4.09ms [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::ShopUpdateJob] [2bba7aef-d6fa-439b-be05-e645a8ab460c] Performing DiscoApp::ShopUpdateJob (Job ID: 2bba7aef-d6fa-439b-be05-e645a8ab460c) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::ShopUpdateJob] [2bba7aef-d6fa-439b-be05-e645a8ab460c]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::ShopUpdateJob] [2bba7aef-d6fa-439b-be05-e645a8ab460c] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::ShopUpdateJob] [2bba7aef-d6fa-439b-be05-e645a8ab460c] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::ShopUpdateJob] [2bba7aef-d6fa-439b-be05-e645a8ab460c]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::ShopUpdateJob] [2bba7aef-d6fa-439b-be05-e645a8ab460c] Performed DiscoApp::ShopUpdateJob (Job ID: 2bba7aef-d6fa-439b-be05-e645a8ab460c) from Test(default) in 6.24ms [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:53.506600' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 12:00:53.507535', '2020-04-14 12:00:53.507535') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857548 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SubscriptionChangedJob] [d14ab314-973b-41ab-9668-19bdb16dfb1f] Performing DiscoApp::SubscriptionChangedJob (Job ID: d14ab314-973b-41ab-9668-19bdb16dfb1f) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SubscriptionChangedJob] [d14ab314-973b-41ab-9668-19bdb16dfb1f] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SubscriptionChangedJob] [d14ab314-973b-41ab-9668-19bdb16dfb1f] [DiscoApp::SendSubscriptionJob] [151cd115-a14c-40bb-8645-37be8aaaf842] Performing DiscoApp::SendSubscriptionJob (Job ID: 151cd115-a14c-40bb-8645-37be8aaaf842) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SubscriptionChangedJob] [d14ab314-973b-41ab-9668-19bdb16dfb1f] [DiscoApp::SendSubscriptionJob] [151cd115-a14c-40bb-8645-37be8aaaf842] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SubscriptionChangedJob] [d14ab314-973b-41ab-9668-19bdb16dfb1f] [DiscoApp::SendSubscriptionJob] [151cd115-a14c-40bb-8645-37be8aaaf842] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SubscriptionChangedJob] [d14ab314-973b-41ab-9668-19bdb16dfb1f] [DiscoApp::SendSubscriptionJob] [151cd115-a14c-40bb-8645-37be8aaaf842] Performed DiscoApp::SendSubscriptionJob (Job ID: 151cd115-a14c-40bb-8645-37be8aaaf842) from Test(default) in 13.37ms [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SubscriptionChangedJob] [d14ab314-973b-41ab-9668-19bdb16dfb1f] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 151cd115-a14c-40bb-8645-37be8aaaf842) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] [DiscoApp::SubscriptionChangedJob] [d14ab314-973b-41ab-9668-19bdb16dfb1f] Performed DiscoApp::SubscriptionChangedJob (Job ID: d14ab314-973b-41ab-9668-19bdb16dfb1f) from Test(default) in 14.75ms [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: d14ab314-973b-41ab-9668-19bdb16dfb1f) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.526982' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d02a4b58-bb94-4690-a294-1c9cc5485b6d] Performed DiscoApp::AppInstalledJob (Job ID: d02a4b58-bb94-4690-a294-1c9cc5485b6d) from Test(default) in 52.78ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: d02a4b58-bb94-4690-a294-1c9cc5485b6d) to Test(default) with arguments: #> DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:53.534849' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] Performing DiscoApp::AppInstalledJob (Job ID: 9960856d-2ae0-43c6-be87-1e713c15d935) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:00:53.538469' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SynchroniseWebhooksJob] [6ad27013-8060-4229-ba3f-ec95dba861ef] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 6ad27013-8060-4229-ba3f-ec95dba861ef) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SynchroniseWebhooksJob] [6ad27013-8060-4229-ba3f-ec95dba861ef] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 6ad27013-8060-4229-ba3f-ec95dba861ef) from Test(default) in 12.72ms [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SynchroniseCarrierServiceJob] [5be6c701-cca7-4364-a7e9-9ab75a494146] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 5be6c701-cca7-4364-a7e9-9ab75a494146) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SynchroniseCarrierServiceJob] [5be6c701-cca7-4364-a7e9-9ab75a494146] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 5be6c701-cca7-4364-a7e9-9ab75a494146) from Test(default) in 3.81ms [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::ShopUpdateJob] [afc8aa44-aee9-4323-a258-2fc43cff8a2d] Performing DiscoApp::ShopUpdateJob (Job ID: afc8aa44-aee9-4323-a258-2fc43cff8a2d) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::ShopUpdateJob] [afc8aa44-aee9-4323-a258-2fc43cff8a2d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::ShopUpdateJob] [afc8aa44-aee9-4323-a258-2fc43cff8a2d] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::ShopUpdateJob] [afc8aa44-aee9-4323-a258-2fc43cff8a2d] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::ShopUpdateJob] [afc8aa44-aee9-4323-a258-2fc43cff8a2d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::ShopUpdateJob] [afc8aa44-aee9-4323-a258-2fc43cff8a2d] Performed DiscoApp::ShopUpdateJob (Job ID: afc8aa44-aee9-4323-a258-2fc43cff8a2d) from Test(default) in 5.03ms [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:53.563553' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 12:00:53.564519', '2020-04-14 12:00:53.564519') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857549 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SubscriptionChangedJob] [e2900f1f-202c-4bcb-a7ba-f09ce43e30e0] Performing DiscoApp::SubscriptionChangedJob (Job ID: e2900f1f-202c-4bcb-a7ba-f09ce43e30e0) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SubscriptionChangedJob] [e2900f1f-202c-4bcb-a7ba-f09ce43e30e0] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SubscriptionChangedJob] [e2900f1f-202c-4bcb-a7ba-f09ce43e30e0] [DiscoApp::SendSubscriptionJob] [98346e61-10ff-4d4c-87fa-11ccbaf557f1] Performing DiscoApp::SendSubscriptionJob (Job ID: 98346e61-10ff-4d4c-87fa-11ccbaf557f1) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SubscriptionChangedJob] [e2900f1f-202c-4bcb-a7ba-f09ce43e30e0] [DiscoApp::SendSubscriptionJob] [98346e61-10ff-4d4c-87fa-11ccbaf557f1] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SubscriptionChangedJob] [e2900f1f-202c-4bcb-a7ba-f09ce43e30e0] [DiscoApp::SendSubscriptionJob] [98346e61-10ff-4d4c-87fa-11ccbaf557f1] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SubscriptionChangedJob] [e2900f1f-202c-4bcb-a7ba-f09ce43e30e0] [DiscoApp::SendSubscriptionJob] [98346e61-10ff-4d4c-87fa-11ccbaf557f1] Performed DiscoApp::SendSubscriptionJob (Job ID: 98346e61-10ff-4d4c-87fa-11ccbaf557f1) from Test(default) in 12.95ms [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SubscriptionChangedJob] [e2900f1f-202c-4bcb-a7ba-f09ce43e30e0] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 98346e61-10ff-4d4c-87fa-11ccbaf557f1) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] [DiscoApp::SubscriptionChangedJob] [e2900f1f-202c-4bcb-a7ba-f09ce43e30e0] Performed DiscoApp::SubscriptionChangedJob (Job ID: e2900f1f-202c-4bcb-a7ba-f09ce43e30e0) from Test(default) in 14.39ms [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: e2900f1f-202c-4bcb-a7ba-f09ce43e30e0) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.583385' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [9960856d-2ae0-43c6-be87-1e713c15d935] Performed DiscoApp::AppInstalledJob (Job ID: 9960856d-2ae0-43c6-be87-1e713c15d935) from Test(default) in 47.46ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 9960856d-2ae0-43c6-be87-1e713c15d935) to Test(default) with arguments: #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:00:53.592997' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] Performing DiscoApp::AppInstalledJob (Job ID: 10ff8ea5-9b36-49b6-aaf7-0b579ba7480e) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:00:53.596185' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SynchroniseWebhooksJob] [98aa5e9b-1655-4e90-91c4-6987286c0d76] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 98aa5e9b-1655-4e90-91c4-6987286c0d76) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SynchroniseWebhooksJob] [98aa5e9b-1655-4e90-91c4-6987286c0d76] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 98aa5e9b-1655-4e90-91c4-6987286c0d76) from Test(default) in 12.51ms [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SynchroniseCarrierServiceJob] [b4180e8e-5d81-4cfb-b12e-bcef3deadc94] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: b4180e8e-5d81-4cfb-b12e-bcef3deadc94) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SynchroniseCarrierServiceJob] [b4180e8e-5d81-4cfb-b12e-bcef3deadc94] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: b4180e8e-5d81-4cfb-b12e-bcef3deadc94) from Test(default) in 3.15ms [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::ShopUpdateJob] [b2031c0a-325c-4306-b18e-5868360f451c] Performing DiscoApp::ShopUpdateJob (Job ID: b2031c0a-325c-4306-b18e-5868360f451c) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::ShopUpdateJob] [b2031c0a-325c-4306-b18e-5868360f451c]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::ShopUpdateJob] [b2031c0a-325c-4306-b18e-5868360f451c] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::ShopUpdateJob] [b2031c0a-325c-4306-b18e-5868360f451c] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::ShopUpdateJob] [b2031c0a-325c-4306-b18e-5868360f451c]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::ShopUpdateJob] [b2031c0a-325c-4306-b18e-5868360f451c] Performed DiscoApp::ShopUpdateJob (Job ID: b2031c0a-325c-4306-b18e-5868360f451c) from Test(default) in 4.48ms [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:53.619429' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 12:00:53.624169', '2020-04-14 12:00:53.624169', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857550 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SubscriptionChangedJob] [a930768a-8445-4d67-81b3-b01acd9bb087] Performing DiscoApp::SubscriptionChangedJob (Job ID: a930768a-8445-4d67-81b3-b01acd9bb087) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SubscriptionChangedJob] [a930768a-8445-4d67-81b3-b01acd9bb087] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SubscriptionChangedJob] [a930768a-8445-4d67-81b3-b01acd9bb087] [DiscoApp::SendSubscriptionJob] [cd13aeba-e369-45c0-9be0-26724afda434] Performing DiscoApp::SendSubscriptionJob (Job ID: cd13aeba-e369-45c0-9be0-26724afda434) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SubscriptionChangedJob] [a930768a-8445-4d67-81b3-b01acd9bb087] [DiscoApp::SendSubscriptionJob] [cd13aeba-e369-45c0-9be0-26724afda434] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SubscriptionChangedJob] [a930768a-8445-4d67-81b3-b01acd9bb087] [DiscoApp::SendSubscriptionJob] [cd13aeba-e369-45c0-9be0-26724afda434] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SubscriptionChangedJob] [a930768a-8445-4d67-81b3-b01acd9bb087] [DiscoApp::SendSubscriptionJob] [cd13aeba-e369-45c0-9be0-26724afda434] Performed DiscoApp::SendSubscriptionJob (Job ID: cd13aeba-e369-45c0-9be0-26724afda434) from Test(default) in 13.88ms [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SubscriptionChangedJob] [a930768a-8445-4d67-81b3-b01acd9bb087] Enqueued DiscoApp::SendSubscriptionJob (Job ID: cd13aeba-e369-45c0-9be0-26724afda434) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] [DiscoApp::SubscriptionChangedJob] [a930768a-8445-4d67-81b3-b01acd9bb087] Performed DiscoApp::SubscriptionChangedJob (Job ID: a930768a-8445-4d67-81b3-b01acd9bb087) from Test(default) in 15.16ms [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: a930768a-8445-4d67-81b3-b01acd9bb087) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.644636' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [10ff8ea5-9b36-49b6-aaf7-0b579ba7480e] Performed DiscoApp::AppInstalledJob (Job ID: 10ff8ea5-9b36-49b6-aaf7-0b579ba7480e) from Test(default) in 51.01ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 10ff8ea5-9b36-49b6-aaf7-0b579ba7480e) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.1ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.1ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.659238' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 12:00:53.661092' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 608)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.667882' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:53.676598' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:53.678372', '2020-04-14 12:00:53.678372', '2020-04-14 12:00:53.677929', '2020-06-13 12:00:53.677950', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b2fa9531-7101-4274-91ce-4ddada218e57) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 11ms (ActiveRecord: 3.6ms | Allocations: 4423) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.687104' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 6.7ms | Allocations: 3636) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 15ms (Views: 7.6ms | ActiveRecord: 2.8ms | Allocations: 7988)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.707232' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 2.9ms | Allocations: 2304) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 7ms (Views: 3.9ms | ActiveRecord: 1.0ms | Allocations: 5223)  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.722549' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 6ms (ActiveRecord: 2.2ms | Allocations: 2417) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.736077' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:53.744529' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:53.745517', '2020-04-14 12:00:53.745517', '2020-04-14 12:00:53.745095', '2020-05-12 12:00:53.745109', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 87bc49ae-e214-4c77-b32a-36d424ca9aaf) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 10ms (ActiveRecord: 2.8ms | Allocations: 4102) DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.753192' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 214)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:53.759533' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:00:53.767116' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:00:53.767980', '2020-04-14 12:00:53.767980', '2020-04-14 12:00:53.767592', '2020-05-12 12:00:53.767605', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: f6415ec0-7223-4a65-91df-a819628b32a7) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 7ms (ActiveRecord: 1.7ms | Allocations: 3051) DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:00:53.779511' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:00:53.790399' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.4ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 12:00:53.800281', '2020-04-14 12:00:53.800281') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 12:00:53.813861', '2020-04-14 12:00:53.813861') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:00:53.833762' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:00:53.848715' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:00:53.873282' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [54e02141-48c4-46a7-aafb-72244a2e78f3] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 54e02141-48c4-46a7-aafb-72244a2e78f3) from Test(default) enqueued at 2020-04-14T12:00:53Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [54e02141-48c4-46a7-aafb-72244a2e78f3] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 54e02141-48c4-46a7-aafb-72244a2e78f3) from Test(default) in 4.62ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: 54e02141-48c4-46a7-aafb-72244a2e78f3) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:53.924847' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: f117ceac-bcd5-4447-bd44-b0eb0a187af3) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.8ms | Allocations: 2075)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 129)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:00:53.933858' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 2c6430e5-e9c7-468b-8718-ffdf0ed7b82a) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms | Allocations: 2066)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 385)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 163)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.8ms | Allocations: 90) Completed 404 Not Found in 4ms (Views: 3.3ms | ActiveRecord: 0.3ms | Allocations: 1954)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.3ms | Allocations: 376)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [bf3cd1e9-8d3d-4279-a8f8-b179237889b0] Performing DiscoApp::SendSubscriptionJob (Job ID: bf3cd1e9-8d3d-4279-a8f8-b179237889b0) from Test(default) enqueued at 2020-04-14T12:00:54Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [bf3cd1e9-8d3d-4279-a8f8-b179237889b0] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [bf3cd1e9-8d3d-4279-a8f8-b179237889b0] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [bf3cd1e9-8d3d-4279-a8f8-b179237889b0] Performed DiscoApp::SendSubscriptionJob (Job ID: bf3cd1e9-8d3d-4279-a8f8-b179237889b0) from Test(default) in 14.37ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: bf3cd1e9-8d3d-4279-a8f8-b179237889b0) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.025459' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:00:54.035713' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 8ms (ActiveRecord: 2.2ms | Allocations: 5842)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.042890' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:00:54.052867' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.057979' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 13ms (ActiveRecord: 2.8ms | Allocations: 10138) DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.065117' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 12:00:54.066822' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 480)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.074245' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 4ms (ActiveRecord: 1.3ms | Allocations: 1900)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.086132' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 8ms (ActiveRecord: 1.8ms | Allocations: 5490)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.102649' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 3ms (ActiveRecord: 1.0ms | Allocations: 1243)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.110784' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.8ms | Allocations: 1596)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.120128' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.5ms | Allocations: 430) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 0.9ms | Allocations: 4293)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.133946' WHERE "disco_app_shops"."id" = 605094243  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 12:00:54.141800', '2020-04-14 12:00:54.141800') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 12:00:54.146297', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 10ms (ActiveRecord: 2.2ms | Allocations: 6407)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:00:54.152365' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 215)  (0.1ms) ROLLBACK  (0.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.1ms) BEGIN  (0.9ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.8ms) COMMIT  (0.1ms) BEGIN Fixtures Load (2.7ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 12:01:16.760308', '2020-04-14 12:01:16.760308'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 12:01:16.763959', '2020-04-14 12:01:16.763959', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 12:01:16.763959', '2020-04-14 12:01:16.763959', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 12:01:16.768479', '2020-04-14 12:01:16.768479', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 12:01:16.768479', '2020-04-14 12:01:16.768479', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 12:01:16.770514', '2020-04-14 12:01:16.770514', DEFAULT, DEFAULT, '2020-04-07 12:01:16', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 12:01:16.770514', '2020-04-14 12:01:16.770514', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 12:01:16.772806', '2020-04-14 12:01:16.772806'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 12:01:16.774971', '2020-04-14 12:01:16.774971', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 12:01:16.777499', '2020-04-14 12:01:16.777499', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 12:01:16.777499', '2020-04-14 12:01:16.777499', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 12:01:16.777499', '2020-04-14 12:01:16.777499', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 12:01:16.777499', '2020-04-14 12:01:16.777499', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 12:01:16.777499', '2020-04-14 12:01:16.777499', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 12:01:16.777499', '2020-04-14 12:01:16.777499', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 12:01:16.781672', '2020-04-14 12:01:16.781672'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.4ms) COMMIT  (0.1ms) BEGIN  (0.7ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.7ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:16.844968', '2020-04-14 12:01:16.844968') RETURNING "id"  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.6ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 37  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:16.854166', '2020-04-14 12:01:16.854166') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.2ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 38  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:16.858471', '2020-04-14 12:01:16.858471') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 39  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:17.041230', '2020-04-14 12:01:17.041230') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 40  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [77483191-af24-4990-b65d-c9a6c142c318] Performing DiscoApp::SendSubscriptionJob (Job ID: 77483191-af24-4990-b65d-c9a6c142c318) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [77483191-af24-4990-b65d-c9a6c142c318] DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [77483191-af24-4990-b65d-c9a6c142c318] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [77483191-af24-4990-b65d-c9a6c142c318] Performed DiscoApp::SendSubscriptionJob (Job ID: 77483191-af24-4990-b65d-c9a6c142c318) from Test(default) in 35.93ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 77483191-af24-4990-b65d-c9a6c142c318) to Test(default) with arguments: #>  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.4ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:17.180855' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] Performing DiscoApp::AppInstalledJob (Job ID: 785fd097-a386-4a9a-9036-372a6bd194ec) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:01:17.184414' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SynchroniseWebhooksJob] [cc7500ba-cb7f-4744-821c-837a67bcde68] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: cc7500ba-cb7f-4744-821c-837a67bcde68) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SynchroniseWebhooksJob] [cc7500ba-cb7f-4744-821c-837a67bcde68] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: cc7500ba-cb7f-4744-821c-837a67bcde68) from Test(default) in 15.41ms [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SynchroniseCarrierServiceJob] [81be39f5-3717-4a2d-b967-e7eb3dbbbcee] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 81be39f5-3717-4a2d-b967-e7eb3dbbbcee) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SynchroniseCarrierServiceJob] [81be39f5-3717-4a2d-b967-e7eb3dbbbcee] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 81be39f5-3717-4a2d-b967-e7eb3dbbbcee) from Test(default) in 5.54ms [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::ShopUpdateJob] [8241c408-8570-4d30-a7ca-0b3c56a61bf7] Performing DiscoApp::ShopUpdateJob (Job ID: 8241c408-8570-4d30-a7ca-0b3c56a61bf7) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::ShopUpdateJob] [8241c408-8570-4d30-a7ca-0b3c56a61bf7]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::ShopUpdateJob] [8241c408-8570-4d30-a7ca-0b3c56a61bf7] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::ShopUpdateJob] [8241c408-8570-4d30-a7ca-0b3c56a61bf7] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::ShopUpdateJob] [8241c408-8570-4d30-a7ca-0b3c56a61bf7]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::ShopUpdateJob] [8241c408-8570-4d30-a7ca-0b3c56a61bf7] Performed DiscoApp::ShopUpdateJob (Job ID: 8241c408-8570-4d30-a7ca-0b3c56a61bf7) from Test(default) in 6.55ms [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:17.241318' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 12:01:17.244087', '2020-04-14 12:01:17.244087') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857542 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SubscriptionChangedJob] [ad768c30-fc7d-4c69-8ee5-bfaa699f5d71] Performing DiscoApp::SubscriptionChangedJob (Job ID: ad768c30-fc7d-4c69-8ee5-bfaa699f5d71) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SubscriptionChangedJob] [ad768c30-fc7d-4c69-8ee5-bfaa699f5d71] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SubscriptionChangedJob] [ad768c30-fc7d-4c69-8ee5-bfaa699f5d71] [DiscoApp::SendSubscriptionJob] [185141f1-0ad4-416b-8e6b-5e9a6be08e14] Performing DiscoApp::SendSubscriptionJob (Job ID: 185141f1-0ad4-416b-8e6b-5e9a6be08e14) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SubscriptionChangedJob] [ad768c30-fc7d-4c69-8ee5-bfaa699f5d71] [DiscoApp::SendSubscriptionJob] [185141f1-0ad4-416b-8e6b-5e9a6be08e14] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SubscriptionChangedJob] [ad768c30-fc7d-4c69-8ee5-bfaa699f5d71] [DiscoApp::SendSubscriptionJob] [185141f1-0ad4-416b-8e6b-5e9a6be08e14] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SubscriptionChangedJob] [ad768c30-fc7d-4c69-8ee5-bfaa699f5d71] [DiscoApp::SendSubscriptionJob] [185141f1-0ad4-416b-8e6b-5e9a6be08e14] Performed DiscoApp::SendSubscriptionJob (Job ID: 185141f1-0ad4-416b-8e6b-5e9a6be08e14) from Test(default) in 13.66ms [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SubscriptionChangedJob] [ad768c30-fc7d-4c69-8ee5-bfaa699f5d71] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 185141f1-0ad4-416b-8e6b-5e9a6be08e14) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] [DiscoApp::SubscriptionChangedJob] [ad768c30-fc7d-4c69-8ee5-bfaa699f5d71] Performed DiscoApp::SubscriptionChangedJob (Job ID: ad768c30-fc7d-4c69-8ee5-bfaa699f5d71) from Test(default) in 15.07ms [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: ad768c30-fc7d-4c69-8ee5-bfaa699f5d71) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:17.265404' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [785fd097-a386-4a9a-9036-372a6bd194ec] Performed DiscoApp::AppInstalledJob (Job ID: 785fd097-a386-4a9a-9036-372a6bd194ec) from Test(default) in 83.64ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 785fd097-a386-4a9a-9036-372a6bd194ec) to Test(default) with arguments: #> DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:17.277672' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] Performing DiscoApp::AppInstalledJob (Job ID: 35811033-6123-4028-9e6d-b1465e4c358e) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:01:17.281067' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SynchroniseWebhooksJob] [d1e59cd0-2634-4752-8c01-8fc38048ade8] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: d1e59cd0-2634-4752-8c01-8fc38048ade8) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SynchroniseWebhooksJob] [d1e59cd0-2634-4752-8c01-8fc38048ade8] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: d1e59cd0-2634-4752-8c01-8fc38048ade8) from Test(default) in 12.64ms [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SynchroniseCarrierServiceJob] [1a92bfe0-5c8b-47fd-a291-e4eb1941c233] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 1a92bfe0-5c8b-47fd-a291-e4eb1941c233) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SynchroniseCarrierServiceJob] [1a92bfe0-5c8b-47fd-a291-e4eb1941c233] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 1a92bfe0-5c8b-47fd-a291-e4eb1941c233) from Test(default) in 3.05ms [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::ShopUpdateJob] [d1184cf2-8ca6-45c1-93cc-d86cf79328d4] Performing DiscoApp::ShopUpdateJob (Job ID: d1184cf2-8ca6-45c1-93cc-d86cf79328d4) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::ShopUpdateJob] [d1184cf2-8ca6-45c1-93cc-d86cf79328d4]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::ShopUpdateJob] [d1184cf2-8ca6-45c1-93cc-d86cf79328d4] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::ShopUpdateJob] [d1184cf2-8ca6-45c1-93cc-d86cf79328d4] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::ShopUpdateJob] [d1184cf2-8ca6-45c1-93cc-d86cf79328d4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::ShopUpdateJob] [d1184cf2-8ca6-45c1-93cc-d86cf79328d4] Performed DiscoApp::ShopUpdateJob (Job ID: d1184cf2-8ca6-45c1-93cc-d86cf79328d4) from Test(default) in 5.12ms [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:17.305022' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 12:01:17.314268', '2020-04-14 12:01:17.314268', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857543 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SubscriptionChangedJob] [8024bfdf-dbdb-44f0-87f9-34e5262975d0] Performing DiscoApp::SubscriptionChangedJob (Job ID: 8024bfdf-dbdb-44f0-87f9-34e5262975d0) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SubscriptionChangedJob] [8024bfdf-dbdb-44f0-87f9-34e5262975d0] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SubscriptionChangedJob] [8024bfdf-dbdb-44f0-87f9-34e5262975d0] [DiscoApp::SendSubscriptionJob] [c5a0f7dd-0bbc-4443-ab66-0556d88be335] Performing DiscoApp::SendSubscriptionJob (Job ID: c5a0f7dd-0bbc-4443-ab66-0556d88be335) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SubscriptionChangedJob] [8024bfdf-dbdb-44f0-87f9-34e5262975d0] [DiscoApp::SendSubscriptionJob] [c5a0f7dd-0bbc-4443-ab66-0556d88be335] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SubscriptionChangedJob] [8024bfdf-dbdb-44f0-87f9-34e5262975d0] [DiscoApp::SendSubscriptionJob] [c5a0f7dd-0bbc-4443-ab66-0556d88be335] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SubscriptionChangedJob] [8024bfdf-dbdb-44f0-87f9-34e5262975d0] [DiscoApp::SendSubscriptionJob] [c5a0f7dd-0bbc-4443-ab66-0556d88be335] Performed DiscoApp::SendSubscriptionJob (Job ID: c5a0f7dd-0bbc-4443-ab66-0556d88be335) from Test(default) in 12.67ms [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SubscriptionChangedJob] [8024bfdf-dbdb-44f0-87f9-34e5262975d0] Enqueued DiscoApp::SendSubscriptionJob (Job ID: c5a0f7dd-0bbc-4443-ab66-0556d88be335) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] [DiscoApp::SubscriptionChangedJob] [8024bfdf-dbdb-44f0-87f9-34e5262975d0] Performed DiscoApp::SubscriptionChangedJob (Job ID: 8024bfdf-dbdb-44f0-87f9-34e5262975d0) from Test(default) in 13.82ms [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 8024bfdf-dbdb-44f0-87f9-34e5262975d0) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:17.332861' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [35811033-6123-4028-9e6d-b1465e4c358e] Performed DiscoApp::AppInstalledJob (Job ID: 35811033-6123-4028-9e6d-b1465e4c358e) from Test(default) in 54.21ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 35811033-6123-4028-9e6d-b1465e4c358e) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:17.343733' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] Performing DiscoApp::AppInstalledJob (Job ID: f20402ce-c00f-4730-ac36-72dc3ab3d6c1) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:01:17.346554' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SynchroniseWebhooksJob] [b3c898ff-dfdc-4a13-8d5f-765bfe27d3d5] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: b3c898ff-dfdc-4a13-8d5f-765bfe27d3d5) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SynchroniseWebhooksJob] [b3c898ff-dfdc-4a13-8d5f-765bfe27d3d5] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: b3c898ff-dfdc-4a13-8d5f-765bfe27d3d5) from Test(default) in 27.8ms [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SynchroniseCarrierServiceJob] [7a38153b-a7ee-4ea4-a040-98412ec93523] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7a38153b-a7ee-4ea4-a040-98412ec93523) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SynchroniseCarrierServiceJob] [7a38153b-a7ee-4ea4-a040-98412ec93523] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 7a38153b-a7ee-4ea4-a040-98412ec93523) from Test(default) in 3.46ms [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::ShopUpdateJob] [9eaf4860-4190-4114-bb08-8fab06b054ec] Performing DiscoApp::ShopUpdateJob (Job ID: 9eaf4860-4190-4114-bb08-8fab06b054ec) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::ShopUpdateJob] [9eaf4860-4190-4114-bb08-8fab06b054ec]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::ShopUpdateJob] [9eaf4860-4190-4114-bb08-8fab06b054ec] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::ShopUpdateJob] [9eaf4860-4190-4114-bb08-8fab06b054ec] DiscoApp::Shop Update (0.6ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::ShopUpdateJob] [9eaf4860-4190-4114-bb08-8fab06b054ec]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::ShopUpdateJob] [9eaf4860-4190-4114-bb08-8fab06b054ec] Performed DiscoApp::ShopUpdateJob (Job ID: 9eaf4860-4190-4114-bb08-8fab06b054ec) from Test(default) in 5.92ms [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:17.387482' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 12:01:17.388735', '2020-04-14 12:01:17.388735') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857544 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SubscriptionChangedJob] [20e0dd77-eab0-4f47-be95-11dd8554294a] Performing DiscoApp::SubscriptionChangedJob (Job ID: 20e0dd77-eab0-4f47-be95-11dd8554294a) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SubscriptionChangedJob] [20e0dd77-eab0-4f47-be95-11dd8554294a] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SubscriptionChangedJob] [20e0dd77-eab0-4f47-be95-11dd8554294a] [DiscoApp::SendSubscriptionJob] [787925d4-685b-4163-9f57-24f43e9ccdfb] Performing DiscoApp::SendSubscriptionJob (Job ID: 787925d4-685b-4163-9f57-24f43e9ccdfb) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SubscriptionChangedJob] [20e0dd77-eab0-4f47-be95-11dd8554294a] [DiscoApp::SendSubscriptionJob] [787925d4-685b-4163-9f57-24f43e9ccdfb] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SubscriptionChangedJob] [20e0dd77-eab0-4f47-be95-11dd8554294a] [DiscoApp::SendSubscriptionJob] [787925d4-685b-4163-9f57-24f43e9ccdfb] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SubscriptionChangedJob] [20e0dd77-eab0-4f47-be95-11dd8554294a] [DiscoApp::SendSubscriptionJob] [787925d4-685b-4163-9f57-24f43e9ccdfb] Performed DiscoApp::SendSubscriptionJob (Job ID: 787925d4-685b-4163-9f57-24f43e9ccdfb) from Test(default) in 17.56ms [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SubscriptionChangedJob] [20e0dd77-eab0-4f47-be95-11dd8554294a] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 787925d4-685b-4163-9f57-24f43e9ccdfb) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] [DiscoApp::SubscriptionChangedJob] [20e0dd77-eab0-4f47-be95-11dd8554294a] Performed DiscoApp::SubscriptionChangedJob (Job ID: 20e0dd77-eab0-4f47-be95-11dd8554294a) from Test(default) in 19.2ms [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 20e0dd77-eab0-4f47-be95-11dd8554294a) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:17.414497' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [f20402ce-c00f-4730-ac36-72dc3ab3d6c1] Performed DiscoApp::AppInstalledJob (Job ID: f20402ce-c00f-4730-ac36-72dc3ab3d6c1) from Test(default) in 70.9ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: f20402ce-c00f-4730-ac36-72dc3ab3d6c1) to Test(default) with arguments: #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:17.445544', '2020-04-14 12:01:17.445544') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 65349d29-7c2c-40d4-99cf-606dbcdab1f2) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.5ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:17.451328', '2020-04-14 12:01:17.451328') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 09e4e93b-98bd-4416-874d-d4dbf8262b01) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 42 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.3ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 42 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.5ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:01:17.470860', '2020-04-14 12:01:17.470860', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.4ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:01:17.476824', '2020-04-14 12:01:17.476824', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 12:01:17.478625', '2020-04-14 12:01:17.478625') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.4ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:01:17.482874', '2020-04-14 12:01:17.482874', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [745042a4-4157-4a15-9f7c-8ff94f99bb68] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 745042a4-4157-4a15-9f7c-8ff94f99bb68) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [745042a4-4157-4a15-9f7c-8ff94f99bb68] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 745042a4-4157-4a15-9f7c-8ff94f99bb68) from Test(default) in 16.8ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 745042a4-4157-4a15-9f7c-8ff94f99bb68) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [19d0be25-0ce0-45dd-8708-79d7bad1af3c] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 19d0be25-0ce0-45dd-8708-79d7bad1af3c) from Test(default) enqueued at 2020-04-14T12:01:17Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [19d0be25-0ce0-45dd-8708-79d7bad1af3c] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 19d0be25-0ce0-45dd-8708-79d7bad1af3c) from Test(default) in 27.21ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 19d0be25-0ce0-45dd-8708-79d7bad1af3c) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.3ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.8ms | Allocations: 342) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.4ms | Allocations: 104) Completed 200 OK in 450ms (Views: 435.3ms | ActiveRecord: 2.3ms | Allocations: 532950)  (0.2ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.024250' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 7ms (ActiveRecord: 1.6ms | Allocations: 2931)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:18.038172' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 512)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:18.046065' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 512)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.053031' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:01:18.054505' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.9ms | Allocations: 2591)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 512)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.071088' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.0ms | Allocations: 13) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 7ms (Views: 1.5ms | ActiveRecord: 1.4ms | Allocations: 4298)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.1ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:01:18.082540' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:01:18.089507' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 224)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.103767' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 4ms (ActiveRecord: 0.7ms | Allocations: 912)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.119699' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 12:01:18.122347' WHERE "disco_app_subscriptions"."id" = 304261385  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.7ms | Allocations: 877)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:01:18.138256' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.6ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:18.169931' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 08d02e11-2ec1-45ec-bf87-8fa60aa5a914) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 7ms (ActiveRecord: 1.4ms | Allocations: 2001) DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.5ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:01:18.177230' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 1.2ms | Allocations: 83) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms | Allocations: 3033)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.192068' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:18.198982' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 2b392fb3-9083-4b52-8da8-0391576f6356) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 7ms (ActiveRecord: 1.3ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.3ms | Allocations: 342)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.5ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:01:18.211775' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.6ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.225070' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 4ms (ActiveRecord: 0.5ms | Allocations: 661)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 12:01:18.286883' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 12:01:18.290528' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.311052' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 12:01:18.312988' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 608)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.319792' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 214)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.325913' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:18.339582' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:18.342234', '2020-04-14 12:01:18.342234', '2020-04-14 12:01:18.341539', '2020-06-13 12:01:18.341560', 8999, 1, 60) RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 78f1cb8c-09e2-4eb9-bc18-66f020a147b1) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 12ms (ActiveRecord: 3.6ms | Allocations: 4419) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.351887' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 6.3ms | Allocations: 3633) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 14ms (Views: 7.2ms | ActiveRecord: 2.5ms | Allocations: 7986)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.370768' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 7ms (ActiveRecord: 2.4ms | Allocations: 2415) DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.384309' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:18.392485' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:18.393786', '2020-04-14 12:01:18.393786', '2020-04-14 12:01:18.393314', '2020-05-12 12:01:18.393330', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 7b73ee49-d1d6-47b6-9d6b-fa10b31076aa) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 8ms (ActiveRecord: 2.4ms | Allocations: 3051) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.402540' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:18.410160' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:18.411033', '2020-04-14 12:01:18.411033', '2020-04-14 12:01:18.410636', '2020-05-12 12:01:18.410648', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 57c7c1e3-6f8e-4dee-b6ab-5b7374e5a4ba) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 9ms (ActiveRecord: 2.3ms | Allocations: 4102) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:18.418532' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 3.2ms | Allocations: 2304) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 8ms (Views: 4.3ms | ActiveRecord: 1.4ms | Allocations: 5223)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:01:18.434883' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.4ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 12:01:18.462704', '2020-04-14 12:01:18.462704') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.3ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 12:01:18.482470', '2020-04-14 12:01:18.482470') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:01:18.494096' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:01:18.502503' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:01:18.518993' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:01:18.532689' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: f6051e0f-3e20-42c9-b2aa-f66a7358c08e) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: f2fe3fd4-c4fb-4a15-a348-515e4ab1ce60) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.5ms | Allocations: 125)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.5ms | Allocations: 115)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.4ms | Allocations: 92)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.2ms | Allocations: 109) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.2ms | Allocations: 141)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 JsConfiguration Update (0.3ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: c5077a53-b0f4-4937-bb7e-a791df31cedc) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 2fc21c92-720d-41cf-92b8-d1364badf21c) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 56cfbc40-fee6-4855-adba-e98a1a2a9129) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 98bac410-2b36-487a-8664-0cdb016a03f3) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 45406a0a-bd27-4842-a36e-015a49a0d55c) to Test(default) with arguments: #>, #>, "widget_assets"  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.1ms | Allocations: 7)  (0.4ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:19.297289' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:19.297289', '2020-04-14 12:01:19.297289', '2020-04-14 12:01:19.297289', '2020-05-12 12:01:19.297289', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6e2bffc8-6ed2-42ef-b33e-d66261bde5d0) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:19.309641' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 12:01:19.309641', '2020-04-14 12:01:19.309641') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 780e2cac-137e-4df4-8037-b76f2ecb1995) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:19.315072' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:19.315072', '2020-04-14 12:01:19.315072', '2020-04-14 12:01:19.315072', '2020-05-12 12:01:19.315072', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b4393b5f-dc02-4b86-b207-296f5ab5eed6) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857550 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857550 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:19.326051' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:19.326051', '2020-04-14 12:01:19.326051', '2020-04-14 12:01:19.326051', '2020-05-12 12:01:19.326051', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857551 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 0c2e8184-98b3-41ff-8a75-ecd1c818df12) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:19.334872' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:19.334872', '2020-04-14 12:01:19.334872', '2020-04-14 12:01:19.334872', '2020-05-12 12:01:19.334872', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 76510ae0-dccc-49a6-9779-10d902366b3e) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:19.345380' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:19.345380', '2020-04-14 12:01:19.345380', '2020-04-14 12:01:19.345380', '2020-06-13 12:01:19.345380', 8999, 1, 60) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6750addd-88fb-4633-8e91-418601b5e12e) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.7ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:19.368692', '2020-04-14 12:01:19.368692') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: aeae967a-08f1-441c-835c-92cf89adc895) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:19.375914', '2020-04-14 12:01:19.375914') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 601047a1-9b64-421a-b34c-ad93b6f32bef) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.3ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 38 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 38 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 2ms (ActiveRecord: 0.0ms | Allocations: 419)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:19.399411' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 4ecc77d5-dd91-4d99-9aed-6e910fd93dd9) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 1.0ms | Allocations: 2473)  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:19.408581' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 14cf3d84-114a-4391-9d58-474ff0ee30d0) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.9ms | Allocations: 2066)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 126)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.3ms | Allocations: 591)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 131)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.6ms | Allocations: 85) Completed 404 Not Found in 4ms (Views: 3.1ms | ActiveRecord: 0.4ms | Allocations: 1794)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 163)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Product Update (0.5ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 12:01:19.478058' WHERE "products"."id" = 632910393  (0.2ms) RELEASE SAVEPOINT active_record_1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:01:19 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [14ce5917-ab0b-4983-9de6-65ede0ca6a95] Performing ProductsCreateJob (Job ID: 14ce5917-ab0b-4983-9de6-65ede0ca6a95) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [14ce5917-ab0b-4983-9de6-65ede0ca6a95] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [14ce5917-ab0b-4983-9de6-65ede0ca6a95] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [14ce5917-ab0b-4983-9de6-65ede0ca6a95]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [14ce5917-ab0b-4983-9de6-65ede0ca6a95] Product Create (0.5ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 12:01:19.498874', '2020-04-14 12:01:19.498874') RETURNING "id" [ActiveJob] [ProductsCreateJob] [14ce5917-ab0b-4983-9de6-65ede0ca6a95]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [14ce5917-ab0b-4983-9de6-65ede0ca6a95] Performed ProductsCreateJob (Job ID: 14ce5917-ab0b-4983-9de6-65ede0ca6a95) from Test(default) in 7.56ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 14ce5917-ab0b-4983-9de6-65ede0ca6a95) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.5ms | Allocations: 12394) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:01:19 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [6bc0c362-b036-4d9b-a062-81a0f382d117] Performing CartsUpdateJob (Job ID: 6bc0c362-b036-4d9b-a062-81a0f382d117) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [6bc0c362-b036-4d9b-a062-81a0f382d117] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [6bc0c362-b036-4d9b-a062-81a0f382d117] Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [6bc0c362-b036-4d9b-a062-81a0f382d117]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [6bc0c362-b036-4d9b-a062-81a0f382d117] Cart Update (0.3ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 12:01:19.519794' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [6bc0c362-b036-4d9b-a062-81a0f382d117]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [6bc0c362-b036-4d9b-a062-81a0f382d117] Performed CartsUpdateJob (Job ID: 6bc0c362-b036-4d9b-a062-81a0f382d117) from Test(default) in 7.91ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: 6bc0c362-b036-4d9b-a062-81a0f382d117) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.3ms | Allocations: 6342) Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:01:19 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [f35a0d76-f97c-4d79-83ff-d213de781857] Performing ProductsDeleteJob (Job ID: f35a0d76-f97c-4d79-83ff-d213de781857) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [f35a0d76-f97c-4d79-83ff-d213de781857] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [f35a0d76-f97c-4d79-83ff-d213de781857] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [f35a0d76-f97c-4d79-83ff-d213de781857]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [f35a0d76-f97c-4d79-83ff-d213de781857] Product Destroy (0.2ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [f35a0d76-f97c-4d79-83ff-d213de781857]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [f35a0d76-f97c-4d79-83ff-d213de781857] Performed ProductsDeleteJob (Job ID: f35a0d76-f97c-4d79-83ff-d213de781857) from Test(default) in 1.99ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: f35a0d76-f97c-4d79-83ff-d213de781857) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 1.0ms | Allocations: 1697)  (0.2ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:01:19 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [82c99ae1-bec0-4007-ab60-78425b0af020] Performing ProductsUpdateJob (Job ID: 82c99ae1-bec0-4007-ab60-78425b0af020) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [82c99ae1-bec0-4007-ab60-78425b0af020] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [82c99ae1-bec0-4007-ab60-78425b0af020] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [82c99ae1-bec0-4007-ab60-78425b0af020]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [82c99ae1-bec0-4007-ab60-78425b0af020] Product Update (0.4ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 12:01:19.542136' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [82c99ae1-bec0-4007-ab60-78425b0af020]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [82c99ae1-bec0-4007-ab60-78425b0af020] Performed ProductsUpdateJob (Job ID: 82c99ae1-bec0-4007-ab60-78425b0af020) from Test(default) in 5.14ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: 82c99ae1-bec0-4007-ab60-78425b0af020) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 9ms (Views: 0.2ms | ActiveRecord: 1.2ms | Allocations: 8449) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [e54f0526-b115-4a46-930b-1bd29c4f5f09] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: e54f0526-b115-4a46-930b-1bd29c4f5f09) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [e54f0526-b115-4a46-930b-1bd29c4f5f09] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: e54f0526-b115-4a46-930b-1bd29c4f5f09) from Test(default) in 4.22ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: e54f0526-b115-4a46-930b-1bd29c4f5f09) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd] Performing DiscoApp::SynchroniseUsersJob (Job ID: 6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd] DiscoApp::User Load (0.4ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 12:01:19.614169', '2020-04-14 12:01:19.614169') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd] DiscoApp::User Update (0.4ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 12:01:19.615483' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 12:01:19.617592', '2020-04-14 12:01:19.617592') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 12:01:19.618604' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd] Performed DiscoApp::SynchroniseUsersJob (Job ID: 6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd) from Test(default) in 56.49ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: 6ef4fd5e-a464-45b6-bfd2-a56ed1c5adbd) to Test(default) with arguments: #> DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.629131' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 5ms (ActiveRecord: 1.5ms | Allocations: 1771)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.640464' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 3ms (ActiveRecord: 0.8ms | Allocations: 1243)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.648507' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 7ms (ActiveRecord: 1.5ms | Allocations: 5517)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.664387' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:01:19.675736' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.680738' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 14ms (ActiveRecord: 3.0ms | Allocations: 10104) DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.686834' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:01:19.697033' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 8ms (ActiveRecord: 1.6ms | Allocations: 5679)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.703061' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 12:01:19.710884', '2020-04-14 12:01:19.710884') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 12:01:19.715490', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 10ms (ActiveRecord: 2.3ms | Allocations: 6407)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.720880' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 215)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.726660' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 4ms (ActiveRecord: 1.0ms | Allocations: 1900)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.738565' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.1ms | Allocations: 434) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 15) Completed 200 OK in 7ms (Views: 2.8ms | ActiveRecord: 0.9ms | Allocations: 4298)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:19.753731' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 12:01:19.756075' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.6ms | Allocations: 480)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:19.763464', '2020-04-14 12:01:19.763464') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 39  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.4ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:19.771044', '2020-04-14 12:01:19.771044') RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 40  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 40  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:19.779112', '2020-04-14 12:01:19.779112') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 41  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:19.782916', '2020-04-14 12:01:19.782916') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 42  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 428)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 100)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:19.809467' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] Performing DiscoApp::AppUninstalledJob (Job ID: 43da064d-c6b7-4636-b00c-9f7e1d693384) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:01:19.812540' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] [DiscoApp::SendSubscriptionJob] [3c1d25f5-77d7-4f43-a5e5-76f6ea074fe6] Performing DiscoApp::SendSubscriptionJob (Job ID: 3c1d25f5-77d7-4f43-a5e5-76f6ea074fe6) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] [DiscoApp::SendSubscriptionJob] [3c1d25f5-77d7-4f43-a5e5-76f6ea074fe6] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] [DiscoApp::SendSubscriptionJob] [3c1d25f5-77d7-4f43-a5e5-76f6ea074fe6] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] [DiscoApp::SendSubscriptionJob] [3c1d25f5-77d7-4f43-a5e5-76f6ea074fe6] Performed DiscoApp::SendSubscriptionJob (Job ID: 3c1d25f5-77d7-4f43-a5e5-76f6ea074fe6) from Test(default) in 13.5ms [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 3c1d25f5-77d7-4f43-a5e5-76f6ea074fe6) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 12:01:19.830608', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:01:19.832419' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [43da064d-c6b7-4636-b00c-9f7e1d693384] Performed DiscoApp::AppUninstalledJob (Job ID: 43da064d-c6b7-4636-b00c-9f7e1d693384) from Test(default) in 21.9ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 43da064d-c6b7-4636-b00c-9f7e1d693384) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:19.838372' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] Performing DiscoApp::AppUninstalledJob (Job ID: 636ab28f-34db-4d5e-9094-7313b69ff09f) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:01:19.841186' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] [DiscoApp::SendSubscriptionJob] [0c33c83f-be1b-4569-a9e1-73a08d2ad7fc] Performing DiscoApp::SendSubscriptionJob (Job ID: 0c33c83f-be1b-4569-a9e1-73a08d2ad7fc) from Test(default) enqueued at 2020-04-14T12:01:19Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] [DiscoApp::SendSubscriptionJob] [0c33c83f-be1b-4569-a9e1-73a08d2ad7fc] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] [DiscoApp::SendSubscriptionJob] [0c33c83f-be1b-4569-a9e1-73a08d2ad7fc] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] [DiscoApp::SendSubscriptionJob] [0c33c83f-be1b-4569-a9e1-73a08d2ad7fc] Performed DiscoApp::SendSubscriptionJob (Job ID: 0c33c83f-be1b-4569-a9e1-73a08d2ad7fc) from Test(default) in 13.48ms [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 0c33c83f-be1b-4569-a9e1-73a08d2ad7fc) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 12:01:19.859537', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:01:19.861327' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [636ab28f-34db-4d5e-9094-7313b69ff09f] Performed DiscoApp::AppUninstalledJob (Job ID: 636ab28f-34db-4d5e-9094-7313b69ff09f) from Test(default) in 22.01ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 636ab28f-34db-4d5e-9094-7313b69ff09f) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1'  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Creating scope :active. Overwriting existing method DiscoApp::ApplicationCharge.active. Creating scope :installed. Overwriting existing method DiscoApp::Shop.installed. Creating scope :active. Overwriting existing method DiscoApp::RecurringApplicationCharge.active. Creating scope :available. Overwriting existing method DiscoApp::Plan.available.  (0.2ms) BEGIN  (1.0ms) ALTER TABLE "disco_app_app_settings" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_users" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" DISABLE TRIGGER ALL;ALTER TABLE "js_configurations" DISABLE TRIGGER ALL;ALTER TABLE "carts" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" DISABLE TRIGGER ALL;ALTER TABLE "widget_configurations" DISABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" DISABLE TRIGGER ALL  (0.9ms) COMMIT  (0.2ms) BEGIN Fixtures Load (3.1ms) DELETE FROM "products"; DELETE FROM "disco_app_application_charges"; DELETE FROM "disco_app_shops"; DELETE FROM "disco_app_plan_codes"; DELETE FROM "disco_app_subscriptions"; DELETE FROM "disco_app_sources"; DELETE FROM "disco_app_recurring_application_charges"; DELETE FROM "disco_app_plans"; DELETE FROM "widget_configurations"; DELETE FROM "carts"; DELETE FROM "js_configurations"; INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910393, 605094243, '{}', '2020-04-14 12:01:29.137891', '2020-04-14 12:01:29.137891'); INSERT INTO "disco_app_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (50060184, 605094243, 31191756, 4, '2020-04-14 12:01:29.142358', '2020-04-14 12:01:29.142358', DEFAULT, DEFAULT), (550483571, 472012368, 31191756, 0, '2020-04-14 12:01:29.142358', '2020-04-14 12:01:29.142358', 1012637323, 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98'); INSERT INTO "disco_app_shops" ("id", "shopify_domain", "shopify_token", "created_at", "updated_at", "status", "domain", "plan_name", "name", "data") VALUES (605094243, 'widgets.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Australia","timezone":"(GMT+10:00) Melbourne"}'), (472012368, 'widgets-dev.myshopify.com', '0', '2017-03-07 06:06:25', '2017-03-07 06:06:25', 3, DEFAULT, DEFAULT, DEFAULT, '{"country_name":"Sweden","primary_locale":"sv"}'); INSERT INTO "disco_app_plan_codes" ("id", "plan_id", "code", "trial_period_days", "amount", "created_at", "updated_at", "status") VALUES (1, 154997895, 'PODCAST', 60, 8999, '2020-04-14 12:01:29.149473', '2020-04-14 12:01:29.149473', DEFAULT), (2, 1, 'PODCAST', 60, 0, '2020-04-14 12:01:29.149473', '2020-04-14 12:01:29.149473', DEFAULT); INSERT INTO "disco_app_subscriptions" ("id", "shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "cancelled_at", "amount", "plan_code_id", "trial_period_days", "source_id") VALUES (741857541, 605094243, 557794242, 2, 0, '2020-04-14 12:01:29.151895', '2020-04-14 12:01:29.151895', DEFAULT, DEFAULT, '2020-04-07 12:01:29', 99, DEFAULT, DEFAULT, DEFAULT), (304261385, 605094243, 276395349, 1, 0, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT, DEFAULT, 999, DEFAULT, 14, DEFAULT), (31191756, 472012368, 1038561416, 1, 1, '2020-04-14 12:01:29.151895', '2020-04-14 12:01:29.151895', DEFAULT, DEFAULT, DEFAULT, 4900, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "disco_app_sources" ("id", "source", "name", "created_at", "updated_at") VALUES (697059919, 'smp', 'smpodcast', '2020-04-14 12:01:29.154291', '2020-04-14 12:01:29.154291'); INSERT INTO "disco_app_recurring_application_charges" ("id", "shop_id", "subscription_id", "status", "created_at", "updated_at", "shopify_id", "confirmation_url") VALUES (332186283, 605094243, 304261385, 3, '2017-03-07 06:06:25', '2017-03-07 06:06:25', DEFAULT, DEFAULT), (532970500, 605094243, 304261385, 0, '2020-04-14 12:01:29.156254', '2020-04-14 12:01:29.156254', 654381179, 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa'); INSERT INTO "disco_app_plans" ("id", "status", "name", "plan_type", "trial_period_days", "created_at", "updated_at", "amount", "currency", "interval", "interval_count") VALUES (1, DEFAULT, 'Development', 0, 0, '2020-04-14 12:01:29.158380', '2020-04-14 12:01:29.158380', 0, DEFAULT, DEFAULT, DEFAULT), (724058601, DEFAULT, 'Comped', 0, 0, '2020-04-14 12:01:29.158380', '2020-04-14 12:01:29.158380', 0, DEFAULT, DEFAULT, DEFAULT), (1038561416, DEFAULT, 'Lifetime', 1, 0, '2020-04-14 12:01:29.158380', '2020-04-14 12:01:29.158380', 4900, DEFAULT, DEFAULT, DEFAULT), (557794242, 1, 'Cheapo', 0, 14, '2020-04-14 12:01:29.158380', '2020-04-14 12:01:29.158380', 99, DEFAULT, DEFAULT, DEFAULT), (276395349, DEFAULT, 'Basic', 0, 14, '2020-04-14 12:01:29.158380', '2020-04-14 12:01:29.158380', 999, DEFAULT, DEFAULT, DEFAULT), (154997895, DEFAULT, 'Premium', 0, 28, '2020-04-14 12:01:29.158380', '2020-04-14 12:01:29.158380', 9999, DEFAULT, DEFAULT, DEFAULT); INSERT INTO "widget_configurations" ("id", "shop_id", "locale", "background_color") VALUES (1024427243, 605094243, 'sv', '#006AA7'); INSERT INTO "carts" ("id", "shop_id", "token", "data", "created_at", "updated_at") VALUES (632910393, 605094243, 'efa1e7d02cfc60cf3ddadbed770ef1b6', '{}', '2020-04-14 12:01:29.162726', '2020-04-14 12:01:29.162726'); INSERT INTO "js_configurations" ("id", "shop_id", "locale") VALUES (237747940, 605094243, 'sv')  (0.3ms) COMMIT  (0.1ms) BEGIN  (0.8ms) ALTER TABLE "disco_app_app_settings" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_triggers" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plans" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_recurring_application_charges" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_flow_actions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sessions" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_users" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_sources" ENABLE TRIGGER ALL;ALTER TABLE "js_configurations" ENABLE TRIGGER ALL;ALTER TABLE "carts" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_subscriptions" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_shops" ENABLE TRIGGER ALL;ALTER TABLE "widget_configurations" ENABLE TRIGGER ALL;ALTER TABLE "disco_app_plan_codes" ENABLE TRIGGER ALL  (0.4ms) COMMIT  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_invalid_charge_for_valid_subscription_gets_redirected_to_new_charge_page_for_that_subscription ------------------------------------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.228445' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"304261385", "id"=>"456"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 456 AND "disco_app_recurring_application_charges"."shopify_id" = 789 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 9ms (ActiveRecord: 1.6ms | Allocations: 4160)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_paid-for_current_subscription_can_not_access_page ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.262962' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Redirected to http://test.host/ Filter chain halted as :find_subscription rendered or redirected Completed 302 Found in 6ms (ActiveRecord: 1.3ms | Allocations: 1918)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_declined_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.275513' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:01:29.289493' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 12ms (ActiveRecord: 2.2ms | Allocations: 7571)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.295772' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} Redirected to http://test.host/login?return_to=%2Fsubscriptions%2F304261385%2Fcharges%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 416)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_accepted_charge_succeeds_and_is_redirected_to_the_root_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.303236' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:01:29.333404' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.339289' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/ Completed 302 Found in 33ms (ActiveRecord: 2.8ms | Allocations: 12015) DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::ChargesControllerTest: test_user_trying_to_activate_pending_charge_is_redirected_back_to_new_charge_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.345899' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"654381179", "subscription_id"=>"304261385", "id"=>"532970500"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."id" = 532970500 AND "disco_app_recurring_application_charges"."shopify_id" = 654381179 LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Completed 302 Found in 7ms (ActiveRecord: 1.5ms | Allocations: 5491)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.361114' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 12:01:29.362730' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 516)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_trying_to_activate_charge_for_invalid_gets_not_found_and_hence_404 ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.369849' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#activate as HTML Parameters: {"charge_id"=>"789", "subscription_id"=>"123", "id"=>"456"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 123 LIMIT 1 Completed 404 Not Found in 3ms (ActiveRecord: 0.9ms | Allocations: 1249)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_access_page ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.377841' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#new as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/charges/new.html.erb within layouts/embedded_app (Duration: 1.1ms | Allocations: 677) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.4ms | Allocations: 98) Completed 200 OK in 428ms (Views: 422.5ms | ActiveRecord: 1.1ms | Allocations: 526632)  (0.3ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesControllerTest: test_user_with_unpaid_current_subscription_can_create_new_charge_and_is_redirected_to_confirmation_url --------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:29.813650' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::ChargesController#create as HTML Parameters: {"subscription_id"=>"304261385"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.4ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 12:01:29.828532', '2020-04-14 12:01:29.828532') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "updated_at" = '2020-04-14 12:01:29.841035', "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970501  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa Completed 302 Found in 18ms (ActiveRecord: 3.2ms | Allocations: 14359)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_incorrect_username/password ----------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 173)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_access_shops_list_with_correct_username/password ----------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms | Allocations: 533)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password ------------------------------------------------------------------------------------------------- Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_with_blank_username/password_when_env_variables_are_blank ------------------------------------------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 98)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::Admin::ShopsControllerTest: test_can_not_access_shops_list_without_authorization ------------------------------------------------------------------------------------------ Processing by DiscoApp::Admin::ShopsController#index as HTML Filter chain halted as :authenticate_administrator rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 87)  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_not_queued_when_label_changed --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "label" = 'Sample' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_widget_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/widget.scss.erb Rendered assets/widget.scss.erb (Duration: 0.2ms | Allocations: 111) Rendering assets/widget.js.erb Rendered assets/widget.js.erb (Duration: 0.3ms | Allocations: 150)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_javascript_asset_group_queued_when_locale_changed ------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 JsConfiguration Update (0.2ms) UPDATE "js_configurations" SET "locale" = 'no' WHERE "js_configurations"."id" = 237747940  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 5487b2d5-ae62-49c6-9c53-467678f883e6) to Test(default) with arguments: #>, #>, "js_assets" DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.3ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 98a06de6-8f9e-454e-8d75-6bc678057f9a) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 67676213-ba64-4480-8f03-6700dc6d7059) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_creates_new_script_tag --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.2ms | Allocations: 92)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly ----------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.3ms | Allocations: 115)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_individual_js_asset_renders_correctly_with_minification ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.3ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.3ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.3ms) ROLLBACK  (0.4ms) BEGIN -------------------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_script_tag_asset_group_renders,_uploads_to_shopify_and_updates_existing_script_tag -------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/script_tag.js.erb Rendered assets/script_tag.js.erb (Duration: 0.0ms | Allocations: 4)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::RendersAssetsTest: test_rendering_of_widget_asset_group_queued_when_background_color_changed ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 994c7d69-1e4e-44d4-9ee1-9659a001edd8) to Test(default) with arguments: #>, #>, "widget_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_queued_when_locale_changed -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "locale" = 'no' WHERE "widget_configurations"."id" = 1024427243  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 10dfb014-2f39-4ec6-a326-4fec4326b3a2) to Test(default) with arguments: #>, #>, "widget_assets" [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 21e9d17b-b5fb-48ea-a2e8-8737e8435cd2) to Test(default) with arguments: #>, #>, "liquid_assets" DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 WidgetConfiguration Load (0.1ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_js_asset_group_renders_and_uploads_to_shopify ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.5ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.4ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering assets/test.js.erb Rendered assets/test.js.erb (Duration: 0.0ms | Allocations: 7)  (0.4ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_rendering_of_liquid_asset_group_not_queued_when_background_color_changed ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.4ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.5ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 WidgetConfiguration Update (0.2ms) UPDATE "widget_configurations" SET "background_color" = '#FF0000' WHERE "widget_configurations"."id" = 1024427243  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] Enqueued DiscoApp::RenderAssetGroupJob (Job ID: 621645a0-01b3-4fb0-bbfd-d7b5b815d131) to Test(default) with arguments: #>, #>, "widget_assets"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------- DiscoApp::RendersAssetsTest: test_liquid_asset_group_renders_and_uploads_to_shopify ----------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 JsConfiguration Load (0.2ms) SELECT "js_configurations".* FROM "js_configurations" WHERE "js_configurations"."id" = 237747940 LIMIT 1 WidgetConfiguration Load (0.2ms) SELECT "widget_configurations".* FROM "widget_configurations" WHERE "widget_configurations"."id" = 1024427243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Rendering snippets/widget.liquid.erb Rendered snippets/widget.liquid.erb (Duration: 0.4ms | Allocations: 114)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------ DiscoAppTest: test_truth ------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_a_single_namespace ------------------------------------------------------------------------------ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::HasMetafieldsTest: test_can_write_metafields_with_multiple_namespaces ------------------------------------------------------------------------------- Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.4ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SynchroniseUsersJobTest: test_Successfully_synchronise_users_via_background_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d] Performing DiscoApp::SynchroniseUsersJob (Job ID: 60e5d405-10d2-4f1f-9058-e0e7be06b31d) from Test(default) enqueued at 2020-04-14T12:01:30Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d] DiscoApp::User Load (0.4ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 799407056 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (799407056, 605094243, '2020-04-14 12:01:30.664455', '2020-04-14 12:01:30.664455') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'Steve', "last_name" = 'Jobs', "email" = 'steve@apple.com', "updated_at" = '2020-04-14 12:01:30.665841' WHERE "disco_app_users"."id" = 799407056 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d] DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" WHERE "disco_app_users"."id" = 930143300 AND "disco_app_users"."shop_id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d] DiscoApp::User Create (0.2ms) INSERT INTO "disco_app_users" ("id", "shop_id", "created_at", "updated_at") VALUES (930143300, 605094243, '2020-04-14 12:01:30.667657', '2020-04-14 12:01:30.667657') RETURNING "id" [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d] DiscoApp::User Update (0.2ms) UPDATE "disco_app_users" SET "first_name" = 'noaccesssteve', "last_name" = 'Jobs', "email" = 'noaccesssteve@jobs.com', "updated_at" = '2020-04-14 12:01:30.668875' WHERE "disco_app_users"."id" = 930143300 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::SynchroniseUsersJob] [60e5d405-10d2-4f1f-9058-e0e7be06b31d] Performed DiscoApp::SynchroniseUsersJob (Job ID: 60e5d405-10d2-4f1f-9058-e0e7be06b31d) from Test(default) in 55.82ms [ActiveJob] Enqueued DiscoApp::SynchroniseUsersJob (Job ID: 60e5d405-10d2-4f1f-9058-e0e7be06b31d) to Test(default) with arguments: #> DiscoApp::User Load (0.2ms) SELECT "disco_app_users".* FROM "disco_app_users" ORDER BY "disco_app_users"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_subscription_can_create_new_subscription_for_available_plan ----------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:30.679176' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.5ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:30.693098' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:30.695941', '2020-04-14 12:01:30.695941', '2020-04-14 12:01:30.693897', '2020-05-12 12:01:30.693921', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857542 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 749c52f0-fb1f-4271-9ccb-b0157e38a6ba) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 13ms (ActiveRecord: 2.8ms | Allocations: 4785) DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_no_current_subscription_can_access_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:30.706907' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.1ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.2ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 5.2ms | Allocations: 3068) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 10ms (Views: 6.8ms | ActiveRecord: 1.0ms | Allocations: 6356)  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription_with_valid_cookied_plan_code -------------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:30.725111' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:30.732577' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.4ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:30.738716', '2020-04-14 12:01:30.738716', '2020-04-14 12:01:30.738229', '2020-06-13 12:01:30.738247', 8999, 1, 60) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857543 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: eff59078-9f29-4c82-8e5c-030587022881) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 15ms (ActiveRecord: 3.1ms | Allocations: 9121) DiscoApp::Subscription Load (0.7ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:30.748973' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML Redirected to http://test.host/login?return_to=%2Fsubscriptions%2Fnew%3F Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 214)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_not_create_new_subscription_for_unavailable_plan ---------------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:30.754530' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 557794242 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"557794242"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 557794242 LIMIT 1 Redirected to http://test.host/subscriptions/new Completed 302 Found in 5ms (ActiveRecord: 1.6ms | Allocations: 2415) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:30.766534' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 0, "updated_at" = '2020-04-14 12:01:30.768269' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.5ms | Allocations: 479)  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_create_new_subscription --------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:30.774731' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 Processing by DiscoApp::SubscriptionsController#create as HTML Parameters: {"subscription"=>{"plan"=>"154997895"}} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 AND "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:30.781497' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:30.782392', '2020-04-14 12:01:30.782392', '2020-04-14 12:01:30.781986', '2020-05-12 12:01:30.782000', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857544 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 21d8dacb-2516-45c0-8868-ced3a5442df3) to Test(default) with arguments: #>, #> Redirected to http://test.host/ Completed 302 Found in 8ms (ActiveRecord: 2.3ms | Allocations: 4102) DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionsControllerTest: test_logged-in,_installed_user_with_current_subscription_can_access_page --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:30.790825' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::SubscriptionsController#new as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."status" = 0 Rendered /Users/pille/Disco/disco_app/app/views/disco_app/subscriptions/new.html.erb within layouts/embedded_app (Duration: 4.0ms | Allocations: 2854) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 10ms (Views: 4.8ms | ActiveRecord: 2.0ms | Allocations: 6824)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_action_that_has_already_succeeded_fails ----------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.4ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:30.815928', '2020-04-14 12:01:30.815928') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 43  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_non-existent_service_class_does_not_succeed ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:30.822406', '2020-04-14 12:01:30.822406') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "action_id" = 'unknown_test_action_id', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 44  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.3ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '["Could not find service class for unknown_test_action_id"]' WHERE "disco_app_flow_actions"."id" = 44  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessActionTest: test_processing_pending_action_with_existing_service_class_succeeds ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:30.829190', '2020-04-14 12:01:30.829190') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 45  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessActionTest: test_call_to_process_trigger_that_has_already_failed_fails --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.2ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:30.833106', '2020-04-14 12:01:30.833106') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Update (0.2ms) UPDATE "disco_app_flow_actions" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_actions"."id" = 46  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_failed_fails ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:30.848800', '2020-04-14 12:01:30.848800') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.5ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 43  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_call_to_process_trigger_that_has_already_succeeded_fails ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:30.855950', '2020-04-14 12:01:30.855950') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 44  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Flow::ProcessTriggerTest: test_processing_invalid_pending_trigger_makes_the_expected_api_call_with_errors_logged -------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.3ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:30.860994', '2020-04-14 12:01:30.860994') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.4ms) UPDATE "disco_app_flow_triggers" SET "status" = 2, "processed_at" = '2018-12-29 00:00:00', "processing_errors" = '[{"field":["body"],"message":"Errors validating schema:\n Invalid trigger_title ''Test trigger''.\n"}]', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 45  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ DiscoApp::Flow::ProcessTriggerTest: test_processing_valid_pending_trigger_succeeds_and_makes_the_expected_api_call ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:31.090984', '2020-04-14 12:01:31.090984') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Update (0.3ms) UPDATE "disco_app_flow_triggers" SET "status" = 1, "processed_at" = '2018-12-29 00:00:00', "updated_at" = '2018-12-29 00:00:00' WHERE "disco_app_flow_triggers"."id" = 46  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_invalid_HMAC_returns_unauthorized --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 434)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_no_HMAC_returns_unauthorized ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::WebhooksControllerTest: test_app_uninstalled_job_queued_when_app/uninstalled_webhook_arrives ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:31.151250' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: ca8616d4-fe4a-42ce-8aa6-1303208cbbfa) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 1.0ms | Allocations: 2396)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_with_valid_HMAC_returns_OK --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:31.158935' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 290fbb0e-9106-4790-83d5-8bd55ab34682) to Test(default) with arguments: "widgets.myshopify.com", {"shop"=>{"id"=>3788917, "name"=>"ONE INCH ROUND ® ", "email"=>"gavin@gavinballard.com", "domain"=>"one-inch-round-development.myshopify.com", "created_at"=>"2014-02-19T11:50:27-08:00", "province"=>"Oregon", "country"=>"US", "address1"=>"4016 SE Division St. #A", "zip"=>"97202", "city"=>"Portland", "source"=>nil, "phone"=>"5032338003", "updated_at"=>"2015-10-07T14:35:47-07:00", "customer_email"=>nil, "latitude"=>45.5048, "longitude"=>-122.621, "primary_location_id"=>nil, "primary_locale"=>"en", "country_code"=>"US", "country_name"=>"United States", "currency"=>"USD", "timezone"=>"(GMT-08:00) Pacific Time (US & Canada)", "iana_timezone"=>"America/Los_Angeles", "shop_owner"=>"Gavin Ballard", "money_format"=>"${{amount}}", "money_with_currency_format"=>"${{amount}} USD", "province_code"=>"OR", "taxes_included"=>false, "tax_shipping"=>nil, "county_taxes"=>true, "plan_display_name"=>"affiliate", "plan_name"=>"affiliate", "myshopify_domain"=>"one-inch-round-development.myshopify.com", "google_apps_domain"=>nil, "google_apps_login_enabled"=>nil, "money_in_emails_format"=>"${{amount}}", "money_with_currency_in_emails_format"=>"${{amount}} USD", "eligible_for_payments"=>true, "requires_extra_payments_agreement"=>false, "password_enabled"=>false, "has_storefront"=>true, "setup_required"=>false}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.2ms | Allocations: 2064)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::WebhooksControllerTest: test_webhook_request_without_authentication_information_returns_unauthorized -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::WebhooksController#process_webhook as HTML Filter chain halted as :verify_webhook rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 127)  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseCarrierServiceJobTest: test_carrier_service_synchronisation_job_creates_expected_carrier_service --------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [b9f7279b-3748-46d1-9bac-637ec8812a9b] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: b9f7279b-3748-46d1-9bac-637ec8812a9b) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseCarrierServiceJob] [b9f7279b-3748-46d1-9bac-637ec8812a9b] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: b9f7279b-3748-46d1-9bac-637ec8812a9b) from Test(default) in 4.63ms [ActiveJob] Enqueued DiscoApp::SynchroniseCarrierServiceJob (Job ID: b9f7279b-3748-46d1-9bac-637ec8812a9b) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_without_authentication_information_returns_unauthorized --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms | Allocations: 385)  (0.1ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_but_unknown_shop_returns_404 ---------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"unknown.myshopify.com", "signature"=>"66c50a76e7331e61d402a817a005f05d31d1ee5e7e2dec2ea92187d223f2cf63"} DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'unknown.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb Rendered /Users/pille/Disco/disco_app/app/views/disco_app/proxy_errors/404.html.erb (Duration: 0.4ms | Allocations: 92) Completed 404 Not Found in 4ms (Views: 3.2ms | ActiveRecord: 0.4ms | Allocations: 1970)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ---------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_incorrect_authentication_information_returns_unauthorized ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"invalid_signature"} Filter chain halted as :verify_proxy_signature rendered or redirected Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 163)  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------- ProxyControllerTest: test_app_proxy_request_with_correct_authentication_information_returns_ok_and_has_shop_context ------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by ProxyController#index as HTML Parameters: {"shop"=>"widgets.myshopify.com", "signature"=>"3059b638cbabe573cdc9bc91e6acedbe4a22cac6198a2317f93f3181a2b457eb"} DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.3ms | Allocations: 376)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_subscription_with_declined_charge_is_redirected_to_new_charges_page ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.208551' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:01:31.209838' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 7ms (ActiveRecord: 2.1ms | Allocations: 2843)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_current_but_unpaid_subscription_is_redirected_to_new_charges_page ------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.223244' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/304261385/charges/new Filter chain halted as :check_active_charge rendered or redirected Completed 302 Found in 7ms (ActiveRecord: 2.1ms | Allocations: 2591)  (0.3ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installing_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:01:31.237231' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 512)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalled_user_is_redirected_to_the_install_page -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:01:31.244361' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 479)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_logged_in_if_valid_hmac_and_shop_domain_is_present_in_url -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Parameters: {"hmac"=>"eb49ba93a8daf8a11a04c66129faf98de1cd40f082b0ae78e79a2dfbbefb438d", "shop"=>"widgets-dev.myshopify.com", "timestamp"=>"1488937498"} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets-dev.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 472012368 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::ApplicationCharge Load (0.3ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 31191756 AND "disco_app_application_charges"."status" = 4 ORDER BY "disco_app_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.4ms | Allocations: 114) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 21) Completed 200 OK in 15ms (Views: 2.4ms | ActiveRecord: 2.0ms | Allocations: 9902)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_uninstall_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:31.270198' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 512)  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_uninstalling_user_is_redirected_to_the_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:01:31.277103' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/uninstalling Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_installed_user_with_no_current_subscription_is_redirected_to_new_subscription_page ---------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.283839' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.7ms | Allocations: 911)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_never_installed_user_is_redirected_to_the_install_page ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.3ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_a_current_and_paid_subscription_is_able_to_access_the_page ------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.1ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.299267' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 Rendering home/index.html.erb within layouts/embedded_app Rendered home/index.html.erb within layouts/embedded_app (Duration: 0.0ms | Allocations: 13) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 1.5ms | Allocations: 4297)  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- HomeControllerTest: test_non-logged_in_user_is_redirected_to_the_login_page_if_no_hmac_and_shop_domain_present -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1 Processing by HomeController#index as HTML Redirected to http://test.host/login Filter chain halted as :shopify_shop rendered or redirected Completed 302 Found in 0ms (ActiveRecord: 0.0ms | Allocations: 224)  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ HomeControllerTest: test_logged-in,_installed_user_with_no_cancelled_subscription_is_redirected_to_new_subscription_page ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.314534' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.1ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "updated_at" = '2020-04-14 12:01:31.315607' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 Redirected to http://test.host/subscriptions/new Filter chain halted as :check_current_subscription rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 877)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- HomeControllerTest: test_logged-in,_awaiting_install_user_is_redirected_to_the_installing_page ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:31.323156' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by HomeController#index as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.7ms | Allocations: 478)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan_with_a_plan_code_and_a_source ----------------------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.3ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.2ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:31.337002' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] Performing DiscoApp::AppInstalledJob (Job ID: 3b4796e5-8487-4049-b7ca-0c8622566bb0) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #>, "PODCAST", "smp" [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:01:31.339862' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SynchroniseWebhooksJob] [03fe29d1-8888-4c32-adaa-e80ab33c730b] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 03fe29d1-8888-4c32-adaa-e80ab33c730b) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SynchroniseWebhooksJob] [03fe29d1-8888-4c32-adaa-e80ab33c730b] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 03fe29d1-8888-4c32-adaa-e80ab33c730b) from Test(default) in 13.01ms [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SynchroniseCarrierServiceJob] [347165b4-592f-45a9-9024-85c023b2687e] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: 347165b4-592f-45a9-9024-85c023b2687e) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SynchroniseCarrierServiceJob] [347165b4-592f-45a9-9024-85c023b2687e] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: 347165b4-592f-45a9-9024-85c023b2687e) from Test(default) in 4.16ms [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::ShopUpdateJob] [c0d8bd1c-a12d-45a5-84b6-4fd69f8f58ec] Performing DiscoApp::ShopUpdateJob (Job ID: c0d8bd1c-a12d-45a5-84b6-4fd69f8f58ec) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::ShopUpdateJob] [c0d8bd1c-a12d-45a5-84b6-4fd69f8f58ec]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::ShopUpdateJob] [c0d8bd1c-a12d-45a5-84b6-4fd69f8f58ec] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::ShopUpdateJob] [c0d8bd1c-a12d-45a5-84b6-4fd69f8f58ec] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::ShopUpdateJob] [c0d8bd1c-a12d-45a5-84b6-4fd69f8f58ec]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::ShopUpdateJob] [c0d8bd1c-a12d-45a5-84b6-4fd69f8f58ec] Performed DiscoApp::ShopUpdateJob (Job ID: c0d8bd1c-a12d-45a5-84b6-4fd69f8f58ec) from Test(default) in 5.73ms [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:31.368135' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::PlanCode Load (0.2ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 1 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Source Load (0.2ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."source" = 'smp' LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "plan_code_id", "source_id") VALUES (605094243, 1, 1, 0, '2020-04-14 12:01:31.372665', '2020-04-14 12:01:31.372665', 2, 697059919) RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857545 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SubscriptionChangedJob] [584a11ff-cd9f-4d63-9797-702c1ad417fc] Performing DiscoApp::SubscriptionChangedJob (Job ID: 584a11ff-cd9f-4d63-9797-702c1ad417fc) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SubscriptionChangedJob] [584a11ff-cd9f-4d63-9797-702c1ad417fc] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SubscriptionChangedJob] [584a11ff-cd9f-4d63-9797-702c1ad417fc] [DiscoApp::SendSubscriptionJob] [c0f29153-b83f-4da5-ab14-71854b0ec903] Performing DiscoApp::SendSubscriptionJob (Job ID: c0f29153-b83f-4da5-ab14-71854b0ec903) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SubscriptionChangedJob] [584a11ff-cd9f-4d63-9797-702c1ad417fc] [DiscoApp::SendSubscriptionJob] [c0f29153-b83f-4da5-ab14-71854b0ec903] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SubscriptionChangedJob] [584a11ff-cd9f-4d63-9797-702c1ad417fc] [DiscoApp::SendSubscriptionJob] [c0f29153-b83f-4da5-ab14-71854b0ec903] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857545 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SubscriptionChangedJob] [584a11ff-cd9f-4d63-9797-702c1ad417fc] [DiscoApp::SendSubscriptionJob] [c0f29153-b83f-4da5-ab14-71854b0ec903] Performed DiscoApp::SendSubscriptionJob (Job ID: c0f29153-b83f-4da5-ab14-71854b0ec903) from Test(default) in 14.69ms [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SubscriptionChangedJob] [584a11ff-cd9f-4d63-9797-702c1ad417fc] Enqueued DiscoApp::SendSubscriptionJob (Job ID: c0f29153-b83f-4da5-ab14-71854b0ec903) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] [DiscoApp::SubscriptionChangedJob] [584a11ff-cd9f-4d63-9797-702c1ad417fc] Performed DiscoApp::SubscriptionChangedJob (Job ID: 584a11ff-cd9f-4d63-9797-702c1ad417fc) from Test(default) in 16.63ms [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 584a11ff-cd9f-4d63-9797-702c1ad417fc) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.393927' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [3b4796e5-8487-4049-b7ca-0c8622566bb0] Performed DiscoApp::AppInstalledJob (Job ID: 3b4796e5-8487-4049-b7ca-0c8622566bb0) from Test(default) in 56.52ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 3b4796e5-8487-4049-b7ca-0c8622566bb0) to Test(default) with arguments: #>, "PODCAST", "smp" DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.6ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::PlanCode Load (0.3ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."id" = 2 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Source Load (0.3ms) SELECT "disco_app_sources".* FROM "disco_app_sources" WHERE "disco_app_sources"."id" = 697059919 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------ DiscoApp::AppInstalledJobTest: test_app_installed_job_performs_shop_update_job ------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:31.407496' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] Performing DiscoApp::AppInstalledJob (Job ID: d670f57c-5747-41f4-a4a3-bb346abebca4) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:01:31.412074' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SynchroniseWebhooksJob] [0700230d-fc5e-4752-a986-e3b0fb8aa397] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 0700230d-fc5e-4752-a986-e3b0fb8aa397) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SynchroniseWebhooksJob] [0700230d-fc5e-4752-a986-e3b0fb8aa397] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 0700230d-fc5e-4752-a986-e3b0fb8aa397) from Test(default) in 14.29ms [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SynchroniseCarrierServiceJob] [d1be7461-a9a9-4b32-8f91-3b319645aef5] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: d1be7461-a9a9-4b32-8f91-3b319645aef5) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SynchroniseCarrierServiceJob] [d1be7461-a9a9-4b32-8f91-3b319645aef5] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: d1be7461-a9a9-4b32-8f91-3b319645aef5) from Test(default) in 3.48ms [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::ShopUpdateJob] [4adb0bb4-6968-4c99-96f2-73ff330a894a] Performing DiscoApp::ShopUpdateJob (Job ID: 4adb0bb4-6968-4c99-96f2-73ff330a894a) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::ShopUpdateJob] [4adb0bb4-6968-4c99-96f2-73ff330a894a]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::ShopUpdateJob] [4adb0bb4-6968-4c99-96f2-73ff330a894a] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::ShopUpdateJob] [4adb0bb4-6968-4c99-96f2-73ff330a894a] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::ShopUpdateJob] [4adb0bb4-6968-4c99-96f2-73ff330a894a]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::ShopUpdateJob] [4adb0bb4-6968-4c99-96f2-73ff330a894a] Performed DiscoApp::ShopUpdateJob (Job ID: 4adb0bb4-6968-4c99-96f2-73ff330a894a) from Test(default) in 5.34ms [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:31.438786' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 12:01:31.439756', '2020-04-14 12:01:31.439756') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857546 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SubscriptionChangedJob] [0a746ac8-2cc3-418d-81f8-966403582146] Performing DiscoApp::SubscriptionChangedJob (Job ID: 0a746ac8-2cc3-418d-81f8-966403582146) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SubscriptionChangedJob] [0a746ac8-2cc3-418d-81f8-966403582146] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SubscriptionChangedJob] [0a746ac8-2cc3-418d-81f8-966403582146] [DiscoApp::SendSubscriptionJob] [ae75ba20-4e6e-4520-97e1-d7849f38a57c] Performing DiscoApp::SendSubscriptionJob (Job ID: ae75ba20-4e6e-4520-97e1-d7849f38a57c) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SubscriptionChangedJob] [0a746ac8-2cc3-418d-81f8-966403582146] [DiscoApp::SendSubscriptionJob] [ae75ba20-4e6e-4520-97e1-d7849f38a57c] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SubscriptionChangedJob] [0a746ac8-2cc3-418d-81f8-966403582146] [DiscoApp::SendSubscriptionJob] [ae75ba20-4e6e-4520-97e1-d7849f38a57c] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857546 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SubscriptionChangedJob] [0a746ac8-2cc3-418d-81f8-966403582146] [DiscoApp::SendSubscriptionJob] [ae75ba20-4e6e-4520-97e1-d7849f38a57c] Performed DiscoApp::SendSubscriptionJob (Job ID: ae75ba20-4e6e-4520-97e1-d7849f38a57c) from Test(default) in 13.21ms [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SubscriptionChangedJob] [0a746ac8-2cc3-418d-81f8-966403582146] Enqueued DiscoApp::SendSubscriptionJob (Job ID: ae75ba20-4e6e-4520-97e1-d7849f38a57c) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] [DiscoApp::SubscriptionChangedJob] [0a746ac8-2cc3-418d-81f8-966403582146] Performed DiscoApp::SubscriptionChangedJob (Job ID: 0a746ac8-2cc3-418d-81f8-966403582146) from Test(default) in 14.54ms [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 0a746ac8-2cc3-418d-81f8-966403582146) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.459218' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [d670f57c-5747-41f4-a4a3-bb346abebca4] Performed DiscoApp::AppInstalledJob (Job ID: d670f57c-5747-41f4-a4a3-bb346abebca4) from Test(default) in 50.05ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: d670f57c-5747-41f4-a4a3-bb346abebca4) to Test(default) with arguments: #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------- DiscoApp::AppInstalledJobTest: test_app_installed_job_automatically_subscribes_stores_to_the_correct_default_plan ----------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.3ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:31.469990' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] Performing DiscoApp::AppInstalledJob (Job ID: 28d60ece-2199-4cdd-9998-c9f31bbfcb37) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 2, "updated_at" = '2020-04-14 12:01:31.473095' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SynchroniseWebhooksJob] [9f0a2bb0-f316-4172-a1c0-797e0131a2fb] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 9f0a2bb0-f316-4172-a1c0-797e0131a2fb) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SynchroniseWebhooksJob] [9f0a2bb0-f316-4172-a1c0-797e0131a2fb] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 9f0a2bb0-f316-4172-a1c0-797e0131a2fb) from Test(default) in 15.18ms [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SynchroniseCarrierServiceJob] [c8c4cd36-6134-467e-bc5f-c66014e8899d] Performing DiscoApp::SynchroniseCarrierServiceJob (Job ID: c8c4cd36-6134-467e-bc5f-c66014e8899d) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SynchroniseCarrierServiceJob] [c8c4cd36-6134-467e-bc5f-c66014e8899d] Performed DiscoApp::SynchroniseCarrierServiceJob (Job ID: c8c4cd36-6134-467e-bc5f-c66014e8899d) from Test(default) in 3.45ms [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::ShopUpdateJob] [27866095-07e8-47d6-a85f-7b16d8aaa567] Performing DiscoApp::ShopUpdateJob (Job ID: 27866095-07e8-47d6-a85f-7b16d8aaa567) from Test(default) enqueued at with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::ShopUpdateJob] [27866095-07e8-47d6-a85f-7b16d8aaa567]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::ShopUpdateJob] [27866095-07e8-47d6-a85f-7b16d8aaa567] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::ShopUpdateJob] [27866095-07e8-47d6-a85f-7b16d8aaa567] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2015-10-07 21:35:47', "domain" = 'one-inch-round-development.myshopify.com', "plan_name" = 'affiliate', "name" = 'ONE INCH ROUND ® ', "data" = '{"id":3788917,"name":"ONE INCH ROUND ® ","email":"gavin@gavinballard.com","domain":"one-inch-round-development.myshopify.com","created_at":"2014-02-19T11:50:27-08:00","province":"Oregon","country":"US","address1":"4016 SE Division St. #A","zip":"97202","city":"Portland","source":null,"phone":"5032338003","updated_at":"2015-10-07T14:35:47-07:00","customer_email":null,"latitude":45.5048,"longitude":-122.621,"primary_location_id":null,"primary_locale":"en","country_code":"US","country_name":"United States","currency":"USD","timezone":"(GMT-08:00) Pacific Time (US \u0026 Canada)","iana_timezone":"America/Los_Angeles","shop_owner":"Gavin Ballard","money_format":"${{amount}}","money_with_currency_format":"${{amount}} USD","province_code":"OR","taxes_included":false,"tax_shipping":null,"county_taxes":true,"plan_display_name":"affiliate","plan_name":"affiliate","myshopify_domain":"one-inch-round-development.myshopify.com","google_apps_domain":null,"google_apps_login_enabled":null,"money_in_emails_format":"${{amount}}","money_with_currency_in_emails_format":"${{amount}} USD","eligible_for_payments":true,"requires_extra_payments_agreement":false,"password_enabled":false,"has_storefront":true,"setup_required":false}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::ShopUpdateJob] [27866095-07e8-47d6-a85f-7b16d8aaa567]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::ShopUpdateJob] [27866095-07e8-47d6-a85f-7b16d8aaa567] Performed DiscoApp::ShopUpdateJob (Job ID: 27866095-07e8-47d6-a85f-7b16d8aaa567) from Test(default) in 5.61ms [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:31.500922' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 1, 1, 0, '2020-04-14 12:01:31.502059', '2020-04-14 12:01:31.502059') RETURNING "id" [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857547 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SubscriptionChangedJob] [cacc1fcf-afde-4c96-b011-fa466341d0a0] Performing DiscoApp::SubscriptionChangedJob (Job ID: cacc1fcf-afde-4c96-b011-fa466341d0a0) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SubscriptionChangedJob] [cacc1fcf-afde-4c96-b011-fa466341d0a0] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SubscriptionChangedJob] [cacc1fcf-afde-4c96-b011-fa466341d0a0] [DiscoApp::SendSubscriptionJob] [5af06203-de94-4eee-ac16-304fb3597084] Performing DiscoApp::SendSubscriptionJob (Job ID: 5af06203-de94-4eee-ac16-304fb3597084) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SubscriptionChangedJob] [cacc1fcf-afde-4c96-b011-fa466341d0a0] [DiscoApp::SendSubscriptionJob] [5af06203-de94-4eee-ac16-304fb3597084] DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SubscriptionChangedJob] [cacc1fcf-afde-4c96-b011-fa466341d0a0] [DiscoApp::SendSubscriptionJob] [5af06203-de94-4eee-ac16-304fb3597084] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857547 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SubscriptionChangedJob] [cacc1fcf-afde-4c96-b011-fa466341d0a0] [DiscoApp::SendSubscriptionJob] [5af06203-de94-4eee-ac16-304fb3597084] Performed DiscoApp::SendSubscriptionJob (Job ID: 5af06203-de94-4eee-ac16-304fb3597084) from Test(default) in 13.58ms [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SubscriptionChangedJob] [cacc1fcf-afde-4c96-b011-fa466341d0a0] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 5af06203-de94-4eee-ac16-304fb3597084) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] [DiscoApp::SubscriptionChangedJob] [cacc1fcf-afde-4c96-b011-fa466341d0a0] Performed DiscoApp::SubscriptionChangedJob (Job ID: cacc1fcf-afde-4c96-b011-fa466341d0a0) from Test(default) in 14.92ms [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: cacc1fcf-afde-4c96-b011-fa466341d0a0) to Test(default) with arguments: #>, #> [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.521861' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppInstalledJob] [28d60ece-2199-4cdd-9998-c9f31bbfcb37] Performed DiscoApp::AppInstalledJob (Job ID: 28d60ece-2199-4cdd-9998-c9f31bbfcb37) from Test(default) in 50.98ms [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 28d60ece-2199-4cdd-9998-c9f31bbfcb37) to Test(default) with arguments: #> DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_creates_model ------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.3ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:31.529280', '2020-04-14 12:01:31.529280') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 1e985718-402e-4515-81cf-43e60a8ab93a) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::Flow::CreateActionTest: test_call_to_create_flow_action_enqueues_processing_job ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Action Create (0.4ms) INSERT INTO "disco_app_flow_actions" ("shop_id", "action_id", "action_run_id", "properties", "created_at", "updated_at") VALUES (605094243, 'test_action_id', 'bdb15e45-4f9d-4c80-88c8-7b43a24edaac-30892-cc8eb62a-14db-43fc-bc33-d6dea41ae623', '{"customer_email":"name@example.com"}', '2020-04-14 12:01:31.534232', '2020-04-14 12:01:31.534232') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessActionJob (Job ID: 9631b062-0b15-47d2-bd0d-bb1254025ca5) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 48 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Action Load (0.2ms) SELECT "disco_app_flow_actions".* FROM "disco_app_flow_actions" WHERE "disco_app_flow_actions"."id" = 48 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------- SynchronisesTest: test_cart_with_token_for_id_is_updated_when_cart_updated_webhook_is_received ---------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:01:31 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"created_at\": \"2016-11-05T04:34:40.353Z\",\n \"updated_at\": \"2016-11-05T05:36:58.908Z\",\n \"id\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"token\": \"efa1e7d02cfc60cf3ddadbed770ef1b6\",\n \"line_items\": "=>{"\n {\n \"id\": 27132991496,\n \"properties\": null,\n \"quantity\": 2,\n \"variant_id\": 27132991496,\n \"key\": \"27132991496:bf1f8c0342f4b55df844abfcc8536c49\",\n \"title\": \"Douglas - Black/White - XS\",\n \"price\": \"1600.00\",\n \"original_price\": \"1600.00\",\n \"discounted_price\": \"1600.00\",\n \"line_price\": \"3200.00\",\n \"original_line_price\": \"3200.00\",\n \"total_discount\": \"0.00\",\n \"discounts\": "=>[{","=>nil}]}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [CartsUpdateJob] [6df590c2-1f6f-4da7-8b17-9b4073c9c62f] Performing CartsUpdateJob (Job ID: 6df590c2-1f6f-4da7-8b17-9b4073c9c62f) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} [ActiveJob] [CartsUpdateJob] [6df590c2-1f6f-4da7-8b17-9b4073c9c62f] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [CartsUpdateJob] [6df590c2-1f6f-4da7-8b17-9b4073c9c62f] Cart Load (0.2ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = 'efa1e7d02cfc60cf3ddadbed770ef1b6' LIMIT 1 [ActiveJob] [CartsUpdateJob] [6df590c2-1f6f-4da7-8b17-9b4073c9c62f]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [6df590c2-1f6f-4da7-8b17-9b4073c9c62f] Cart Update (0.5ms) UPDATE "carts" SET "data" = '{"created_at":"2016-11-05T04:34:40.353Z","updated_at":"2016-11-05T05:36:58.908Z","id":"efa1e7d02cfc60cf3ddadbed770ef1b6","token":"efa1e7d02cfc60cf3ddadbed770ef1b6","line_items":[{"id":27132991496,"properties":null,"quantity":2,"variant_id":27132991496,"key":"27132991496:bf1f8c0342f4b55df844abfcc8536c49","title":"Douglas - Black/White - XS","price":"1600.00","original_price":"1600.00","discounted_price":"1600.00","line_price":"3200.00","original_line_price":"3200.00","total_discount":"0.00","discounts":[],"sku":"300 60 041-XS","grams":0,"vendor":"Uniforms for the Dedicated","product_id":8194697800,"gift_card":false}]}', "updated_at" = '2020-04-14 12:01:31.583589' WHERE "carts"."id" = 632910393 [ActiveJob] [CartsUpdateJob] [6df590c2-1f6f-4da7-8b17-9b4073c9c62f]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [CartsUpdateJob] [6df590c2-1f6f-4da7-8b17-9b4073c9c62f] Performed CartsUpdateJob (Job ID: 6df590c2-1f6f-4da7-8b17-9b4073c9c62f) from Test(default) in 7.87ms [ActiveJob] Enqueued CartsUpdateJob (Job ID: 6df590c2-1f6f-4da7-8b17-9b4073c9c62f) to Test(default) with arguments: "widgets.myshopify.com", {"created_at"=>"2016-11-05T04:34:40.353Z", "updated_at"=>"2016-11-05T05:36:58.908Z", "id"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "token"=>"efa1e7d02cfc60cf3ddadbed770ef1b6", "line_items"=>[{"id"=>27132991496, "properties"=>nil, "quantity"=>2, "variant_id"=>27132991496, "key"=>"27132991496:bf1f8c0342f4b55df844abfcc8536c49", "title"=>"Douglas - Black/White - XS", "price"=>"1600.00", "original_price"=>"1600.00", "discounted_price"=>"1600.00", "line_price"=>"3200.00", "original_line_price"=>"3200.00", "total_discount"=>"0.00", "discounts"=>[], "sku"=>"300 60 041-XS", "grams"=>0, "vendor"=>"Uniforms for the Dedicated", "product_id"=>8194697800, "gift_card"=>false}]} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.7ms | Allocations: 6357) Cart Load (0.4ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------- SynchronisesTest: test_new_product_is_created_when_product_created_webhook_is_received -------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:01:31 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910392,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsCreateJob] [6b9274f6-a0b6-4280-bc1c-39c7c651ced6] Performing ProductsCreateJob (Job ID: 6b9274f6-a0b6-4280-bc1c-39c7c651ced6) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsCreateJob] [6b9274f6-a0b6-4280-bc1c-39c7c651ced6] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsCreateJob] [6b9274f6-a0b6-4280-bc1c-39c7c651ced6] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1 [ActiveJob] [ProductsCreateJob] [6b9274f6-a0b6-4280-bc1c-39c7c651ced6]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [6b9274f6-a0b6-4280-bc1c-39c7c651ced6] Product Create (0.7ms) INSERT INTO "products" ("id", "shop_id", "data", "created_at", "updated_at") VALUES (632910392, 605094243, '{"id":632910392,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', '2020-04-14 12:01:31.597456', '2020-04-14 12:01:31.597456') RETURNING "id" [ActiveJob] [ProductsCreateJob] [6b9274f6-a0b6-4280-bc1c-39c7c651ced6]  (0.3ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsCreateJob] [6b9274f6-a0b6-4280-bc1c-39c7c651ced6] Performed ProductsCreateJob (Job ID: 6b9274f6-a0b6-4280-bc1c-39c7c651ced6) from Test(default) in 7.81ms [ActiveJob] Enqueued ProductsCreateJob (Job ID: 6b9274f6-a0b6-4280-bc1c-39c7c651ced6) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910392, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 12ms (Views: 0.2ms | ActiveRecord: 1.8ms | Allocations: 12440) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910392 LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_deleted_when_product_deleted_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:01:31 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393\n}\n"=>nil} [ActiveJob] DiscoApp::Shop Load (0.7ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsDeleteJob] [1e746a51-6d0f-460e-995d-63766b9a915d] Performing ProductsDeleteJob (Job ID: 1e746a51-6d0f-460e-995d-63766b9a915d) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: "widgets.myshopify.com", {"id"=>632910393} [ActiveJob] [ProductsDeleteJob] [1e746a51-6d0f-460e-995d-63766b9a915d] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsDeleteJob] [1e746a51-6d0f-460e-995d-63766b9a915d] Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."shop_id" = 605094243 AND "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [1e746a51-6d0f-460e-995d-63766b9a915d]  (0.4ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [1e746a51-6d0f-460e-995d-63766b9a915d] Product Destroy (0.3ms) DELETE FROM "products" WHERE "products"."id" = 632910393 [ActiveJob] [ProductsDeleteJob] [1e746a51-6d0f-460e-995d-63766b9a915d]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsDeleteJob] [1e746a51-6d0f-460e-995d-63766b9a915d] Performed ProductsDeleteJob (Job ID: 1e746a51-6d0f-460e-995d-63766b9a915d) from Test(default) in 2.82ms [ActiveJob] Enqueued ProductsDeleteJob (Job ID: 1e746a51-6d0f-460e-995d-63766b9a915d) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 1.8ms | Allocations: 1697)  (0.2ms) SELECT COUNT(*) FROM "products"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- SynchronisesTest: test_existing_product_is_updated_when_product_updated_webhook_is_received ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Started POST "/webhooks" for 127.0.0.1 at 2020-04-14 20:01:31 +0800 Processing by DiscoApp::WebhooksController#process_webhook as HTML Parameters: {"{\n \"id\": 632910393,\n \"title\": \"IPod Nano - 8GB\",\n \"body_html\": \"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\\/p>\",\n \"vendor\": \"Apple\",\n \"product_type\": \"Cult Products\",\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"handle\": \"ipod-nano\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"published_at\": \"2007-12-31T19:00:00-05:00\",\n \"template_suffix\": null,\n \"published_scope\": \"web\",\n \"tags\": \"Emotive, Flash Memory, MP3, Music\",\n \"variants\": "=>{"\n {\n \"id\": 808950810,\n \"product_id\": 632910392,\n \"title\": \"Pink\",\n \"sku\": \"IPOD2008PINK\",\n \"position\": 1,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Pink\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_pink\",\n \"inventory_quantity\": 10,\n \"old_inventory_quantity\": 10,\n \"image_id\": 562641783,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 49148385,\n \"product_id\": 632910392,\n \"title\": \"Red\",\n \"sku\": \"IPOD2008RED\",\n \"position\": 2,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Red\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_red\",\n \"inventory_quantity\": 20,\n \"old_inventory_quantity\": 20,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 39072856,\n \"product_id\": 632910392,\n \"title\": \"Green\",\n \"sku\": \"IPOD2008GREEN\",\n \"position\": 3,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Green\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_green\",\n \"inventory_quantity\": 30,\n \"old_inventory_quantity\": 30,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n },\n {\n \"id\": 457924702,\n \"product_id\": 632910392,\n \"title\": \"Black\",\n \"sku\": \"IPOD2008BLACK\",\n \"position\": 4,\n \"grams\": 200,\n \"inventory_policy\": \"continue\",\n \"fulfillment_service\": \"manual\",\n \"inventory_management\": \"shopify\",\n \"price\": \"199.00\",\n \"compare_at_price\": null,\n \"option1\": \"Black\",\n \"option2\": null,\n \"option3\": null,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"taxable\": true,\n \"requires_shipping\": true,\n \"barcode\": \"1234_black\",\n \"inventory_quantity\": 40,\n \"old_inventory_quantity\": 40,\n \"image_id\": null,\n \"weight\": 0.2,\n \"weight_unit\": \"kg\"\n }\n "=>{",\n \"options\": "=>{"\n {\n \"id\": 594680422,\n \"product_id\": 632910392,\n \"name\": \"Color\",\n \"position\": 1,\n \"values\": "=>{"\n \"Pink\",\n \"Red\",\n \"Green\",\n \"Black\"\n "=>{"\n }\n "=>{",\n \"images\": "=>{"\n {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v"=>"1441219832\",\n \"variant_ids\": [\n ]\n },\n {\n \"id\": 562641783,\n \"product_id\": 632910392,\n \"position\": 2,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano-2.png?v=1441219832\",\n \"variant_ids\": [\n 808950810\n ]\n }\n ],\n \"image\": {\n \"id\": 850703190,\n \"product_id\": 632910392,\n \"position\": 1,\n \"created_at\": \"2015-09-02T14:50:32-04:00\",\n \"updated_at\": \"2015-09-02T14:50:32-04:00\",\n \"src\": \"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0006\\/9093\\/3842\\/products\\/ipod-nano.png?v=1441219832\",\n \"variant_ids\": [\n ]\n }\n}\n"}}}}}}}} [ActiveJob] DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob] [ProductsUpdateJob] [2c38e20e-c380-411f-bfa3-a910a9265788] Performing ProductsUpdateJob (Job ID: 2c38e20e-c380-411f-bfa3-a910a9265788) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} [ActiveJob] [ProductsUpdateJob] [2c38e20e-c380-411f-bfa3-a910a9265788] CACHE DiscoApp::Shop Load (0.0ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [["shopify_domain", "widgets.myshopify.com"], ["LIMIT", 1]] [ActiveJob] [ProductsUpdateJob] [2c38e20e-c380-411f-bfa3-a910a9265788] Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 [ActiveJob] [ProductsUpdateJob] [2c38e20e-c380-411f-bfa3-a910a9265788]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [2c38e20e-c380-411f-bfa3-a910a9265788] Product Update (0.5ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"product_id":632910392,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"product_id":632910392,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"product_id":632910392,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"product_id":632910392,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"product_id":632910392,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"product_id":632910392,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 12:01:31.624899' WHERE "products"."id" = 632910393 [ActiveJob] [ProductsUpdateJob] [2c38e20e-c380-411f-bfa3-a910a9265788]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [ProductsUpdateJob] [2c38e20e-c380-411f-bfa3-a910a9265788] Performed ProductsUpdateJob (Job ID: 2c38e20e-c380-411f-bfa3-a910a9265788) from Test(default) in 4.78ms [ActiveJob] Enqueued ProductsUpdateJob (Job ID: 2c38e20e-c380-411f-bfa3-a910a9265788) to Test(default) with arguments: "widgets.myshopify.com", {"id"=>632910393, "title"=>"IPod Nano - 8GB", "body_html"=>"

It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.

", "vendor"=>"Apple", "product_type"=>"Cult Products", "created_at"=>"2015-09-02T14:50:32-04:00", "handle"=>"ipod-nano", "updated_at"=>"2015-09-02T14:50:32-04:00", "published_at"=>"2007-12-31T19:00:00-05:00", "template_suffix"=>nil, "published_scope"=>"web", "tags"=>"Emotive, Flash Memory, MP3, Music", "variants"=>[{"id"=>808950810, "product_id"=>632910392, "title"=>"Pink", "sku"=>"IPOD2008PINK", "position"=>1, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Pink", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_pink", "inventory_quantity"=>10, "old_inventory_quantity"=>10, "image_id"=>562641783, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>49148385, "product_id"=>632910392, "title"=>"Red", "sku"=>"IPOD2008RED", "position"=>2, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Red", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_red", "inventory_quantity"=>20, "old_inventory_quantity"=>20, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>39072856, "product_id"=>632910392, "title"=>"Green", "sku"=>"IPOD2008GREEN", "position"=>3, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Green", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_green", "inventory_quantity"=>30, "old_inventory_quantity"=>30, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}, {"id"=>457924702, "product_id"=>632910392, "title"=>"Black", "sku"=>"IPOD2008BLACK", "position"=>4, "grams"=>200, "inventory_policy"=>"continue", "fulfillment_service"=>"manual", "inventory_management"=>"shopify", "price"=>"199.00", "compare_at_price"=>nil, "option1"=>"Black", "option2"=>nil, "option3"=>nil, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "taxable"=>true, "requires_shipping"=>true, "barcode"=>"1234_black", "inventory_quantity"=>40, "old_inventory_quantity"=>40, "image_id"=>nil, "weight"=>0.2, "weight_unit"=>"kg"}], "options"=>[{"id"=>594680422, "product_id"=>632910392, "name"=>"Color", "position"=>1, "values"=>["Pink", "Red", "Green", "Black"]}], "images"=>[{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}, {"id"=>562641783, "product_id"=>632910392, "position"=>2, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832", "variant_ids"=>[808950810]}], "image"=>{"id"=>850703190, "product_id"=>632910392, "position"=>1, "created_at"=>"2015-09-02T14:50:32-04:00", "updated_at"=>"2015-09-02T14:50:32-04:00", "src"=>"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832", "variant_ids"=>[]}} Rendering text template Rendered text template (Duration: 0.0ms | Allocations: 2) Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 1.2ms | Allocations: 8449) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------- SynchronisesTest: test_shopify_api_model_still_allows_synchronisation --------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1 Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Product Update (0.5ms) UPDATE "products" SET "data" = '{"id":632910393,"title":"IPod Nano - 8GB","body_html":"\u003cp\u003eIt''s the small iPod with one very big idea: Video. Now the world''s most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.\u003c/p\u003e","vendor":"Apple","product_type":"Cult Products","created_at":"2015-09-02T14:50:32-04:00","handle":"ipod-nano","updated_at":"2015-09-02T14:50:32-04:00","published_at":"2007-12-31T19:00:00-05:00","template_suffix":null,"published_scope":"web","tags":"Emotive, Flash Memory, MP3, Music","variants":[{"id":808950810,"title":"Pink","sku":"IPOD2008PINK","position":1,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Pink","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_pink","inventory_quantity":10,"old_inventory_quantity":10,"image_id":562641783,"weight":0.2,"weight_unit":"kg"},{"id":49148385,"title":"Red","sku":"IPOD2008RED","position":2,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Red","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_red","inventory_quantity":20,"old_inventory_quantity":20,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":39072856,"title":"Green","sku":"IPOD2008GREEN","position":3,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Green","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_green","inventory_quantity":30,"old_inventory_quantity":30,"image_id":null,"weight":0.2,"weight_unit":"kg"},{"id":457924702,"title":"Black","sku":"IPOD2008BLACK","position":4,"grams":200,"inventory_policy":"continue","fulfillment_service":"manual","inventory_management":"shopify","price":"199.00","compare_at_price":null,"option1":"Black","option2":null,"option3":null,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","taxable":true,"requires_shipping":true,"barcode":"1234_black","inventory_quantity":40,"old_inventory_quantity":40,"image_id":null,"weight":0.2,"weight_unit":"kg"}],"options":[{"id":594680422,"product_id":632910392,"name":"Color","position":1,"values":["Pink","Red","Green","Black"]}],"images":[{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]},{"id":562641783,"position":2,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1441219832","variant_ids":[808950810]}],"image":{"id":850703190,"position":1,"created_at":"2015-09-02T14:50:32-04:00","updated_at":"2015-09-02T14:50:32-04:00","src":"https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1441219832","variant_ids":[]}}', "updated_at" = '2020-04-14 12:01:31.635570' WHERE "products"."id" = 632910393  (0.3ms) RELEASE SAVEPOINT active_record_1 Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 632910393 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_shops_current_subscription --------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" = 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.5ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_correct_time_zone_instance_when_known_timezone_defined -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------- DiscoApp::ShopTest: test_can_fetch_a_list_of_all_of_a_shops_subscriptions ------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_locale_when_defined_on_shop_model ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_time_zone_helper_returns_default_Rails_timezone_when_no_known_timezone_defined ------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::ShopTest: test_shops_can_be_extended_via_concerns ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------- DiscoApp::ShopTest: test_locale_helper_returns_correct_en_locale_when_no_known_locale_defined --------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::SubscriptionTest: test_changing_the_amount_on_a_subscription_cancels_its_charge ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Update (0.2ms) UPDATE "disco_app_subscriptions" SET "amount" = 1138, "updated_at" = '2020-04-14 12:01:31.665338' WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4, "updated_at" = '2020-04-14 12:01:31.668115' WHERE "disco_app_recurring_application_charges"."id" = 332186283  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------- ApiClientTest: test_Successful_disco_api_call_render_correct_JSON ----------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN ------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_plan_code_created_correctly ------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.4ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.4ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:31.689898' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) DiscoApp::PlanCode Load (0.4ms) SELECT "disco_app_plan_codes".* FROM "disco_app_plan_codes" WHERE "disco_app_plan_codes"."status" = 0 AND "disco_app_plan_codes"."plan_id" = 154997895 AND "disco_app_plan_codes"."code" = 'PODCAST' LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.5ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "plan_code_id", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:31.689898', '2020-04-14 12:01:31.689898', '2020-04-14 12:01:31.689898', '2020-06-13 12:01:31.689898', 8999, 1, 60) RETURNING "id"  (0.3ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857548 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 6ccc16d1-e8ca-47d0-921d-270afa1cba6c) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_enqueues_subscription_changed_background_job -------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.3ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.3ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:31.701016' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.3ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:31.701016', '2020-04-14 12:01:31.701016', '2020-04-14 12:01:31.701016', '2020-05-12 12:01:31.701016', 9999, 28) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857549 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: b9d9a591-a003-415c-b2a6-8613d3c3a045) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857549 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 741857549 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_works_for_a_shop_without_a_subscription --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 DiscoApp::RecurringApplicationCharge Destroy (0.2ms) DELETE FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 DiscoApp::Subscription Destroy (0.4ms) DELETE FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:31.710307' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:31.710307', '2020-04-14 12:01:31.710307', '2020-04-14 12:01:31.710307', '2020-05-12 12:01:31.710307', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857550 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 13629326-cfb0-4dc9-8adf-3df8daa8c4ba) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_without_a_trial_period_created_correctly ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 724058601 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:31.721549' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at") VALUES (605094243, 724058601, 1, 0, '2020-04-14 12:01:31.721549', '2020-04-14 12:01:31.721549') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: 3cc32023-72d9-4f18-9207-f0d980262391) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------------------ DiscoApp::SubscriptionServiceTest: test_subscribing_to_a_new_plan_deactivates_current_subscription_and_swaps_to_new_plan ------------------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:31.726653' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:31.726653', '2020-04-14 12:01:31.726653', '2020-04-14 12:01:31.726653', '2020-05-12 12:01:31.726653', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857552 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: e394f315-e4e8-4714-98ae-28bbc77eca2f) to Test(default) with arguments: #>, #> DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------------- DiscoApp::SubscriptionServiceTest: test_new_subscription_for_a_plan_with_a_trial_period_created_correctly --------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 154997895 LIMIT 1 DiscoApp::Subscription Update All (0.2ms) UPDATE "disco_app_subscriptions" SET "status" = 2, "cancelled_at" = '2020-04-14 12:01:31.735025' WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1)  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Subscription Create (0.2ms) INSERT INTO "disco_app_subscriptions" ("shop_id", "plan_id", "status", "subscription_type", "created_at", "updated_at", "trial_start_at", "trial_end_at", "amount", "trial_period_days") VALUES (605094243, 154997895, 0, 0, '2020-04-14 12:01:31.735025', '2020-04-14 12:01:31.735025', '2020-04-14 12:01:31.735025', '2020-05-12 12:01:31.735025', 9999, 28) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 741857553 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] Enqueued DiscoApp::SubscriptionChangedJob (Job ID: c09a032a-61c4-4496-856e-193b605354ab) to Test(default) with arguments: #>, #>  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalling_user_sees_uninstalling_page -------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.5ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:01:31.746879' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Rendering /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app Rendered /Users/pille/Disco/disco_app/app/views/disco_app/install/uninstalling.html.erb within layouts/embedded_app (Duration: 0.2ms | Allocations: 83) [Webpacker] Everything's up-to-date. Nothing to do Rendered /Users/pille/Disco/disco_app/app/views/disco_app/shared/_icons.html.erb (Duration: 0.0ms | Allocations: 14) Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.5ms | Allocations: 3154)  (0.2ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------------------ DiscoApp::InstallControllerTest: test_logged-in_but_uninstalled_user_triggers_installation_from_install_page ------------------------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:31.757938' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: b70efc28-aca2-431f-8bdb-ad5ee8dd84b8) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.0ms | Allocations: 1880) DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_installing_url_for_install/uninstalling_actions ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.763121' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 1, "updated_at" = '2020-04-14 12:01:31.766943' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::AppInstalledJob (Job ID: 6448392e-59e7-4c98-9a8d-9d6f156022ca) to Test(default) with arguments: #>, nil, nil Redirected to http://test.host/installing Completed 302 Found in 4ms (ActiveRecord: 1.2ms | Allocations: 1809) Processing by DiscoApp::InstallController#install as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/installing Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.2ms | Allocations: 342)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_installed_user_is_redirected_to_root_url_for_installing ----------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 3, "updated_at" = '2020-04-14 12:01:31.772699' WHERE "disco_app_shops"."id" = 605094243  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#installing as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/ Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 628)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------------- DiscoApp::InstallControllerTest: test_logged-in_and_uninstalled_user_starts_install_process_again ------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:01:31.778369' WHERE "disco_app_shops"."id" = 605094243  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by DiscoApp::InstallController#uninstalling as HTML DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."shopify_domain" = 'widgets.myshopify.com' LIMIT 1 Redirected to http://test.host/install Filter chain halted as :check_installed rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.4ms | Allocations: 478)  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::SessionTest: test_can_fetch_sessions_for_a_particular_shop_through_association ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.5ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:01:31.791485', '2020-04-14 12:01:31.791485', 605094243) RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------- DiscoApp::SessionTest: test_logged_in_sessions_are_linked_to_their_shop ----------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.4ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:01:31.796666', '2020-04-14 12:01:31.796666', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------- DiscoApp::SessionTest: test_sessions_can_be_deleted_by_shop ----------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at", "shop_id") VALUES ('a91bfc51fa79c9d09d43e2615d9345d4', 'BAh7BzoMc2hvcGlmeWkEYwERJDoTc2hvcGlmeV9kb21haW5JIhp3aWRnZXRz Lm15c2hvcGlmeS5jb20GOgZFVA== ', '2020-04-14 12:01:31.799277', '2020-04-14 12:01:31.799277', 605094243) RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::Session Create (0.2ms) INSERT INTO "disco_app_sessions" ("session_id", "data", "created_at", "updated_at") VALUES ('a91bfc51fa79c9d09d43e2615d9345d5', 'BAh7AA== ', '2020-04-14 12:01:31.800306', '2020-04-14 12:01:31.800306') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "disco_app_sessions" DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243  (0.1ms) SELECT COUNT(*) FROM "disco_app_sessions"  (0.1ms) ROLLBACK  (0.1ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_declined_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:01:31.805996' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_pending_recurring_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_one-time_charge_is_successful --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:01:31.822663' WHERE "disco_app_application_charges"."id" = 550483571  (0.2ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.6ms) UPDATE "disco_app_application_charges" SET "status" = 4 WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_a_pending_one-time_charge_is_not_successful ----------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------ DiscoApp::ChargesServiceTest: test_activating_a_declined_one-time_charge_is_not_successful ------------------------------------------------------------------------------------------ DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.2ms) UPDATE "disco_app_application_charges" SET "status" = 2, "updated_at" = '2020-04-14 12:01:31.885322' WHERE "disco_app_application_charges"."id" = 550483571  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_cancels_other_recurring_charges ---------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::Subscription Load (0.3ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:01:31.893113' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN -------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_one-time_subscription_is_successful -------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.1ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.1ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Create (0.3ms) INSERT INTO "disco_app_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (472012368, 31191756, '2020-04-14 12:01:31.908348', '2020-04-14 12:01:31.908348') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.2ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 1038561416 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::ApplicationCharge Update (0.3ms) UPDATE "disco_app_application_charges" SET "shopify_id" = 1012637323, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/1012637323/confirm_application_charge?signature=BAhpBIueWzw%3D--0ea1abacaf9d6fd538b7e9a7023e9b71ce1c7e98' WHERE "disco_app_application_charges"."id" = 550483572  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_creating_a_new_charge_for_a_recurring_subscription_is_successful --------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.1ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.1ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Create (0.3ms) INSERT INTO "disco_app_recurring_application_charges" ("shop_id", "subscription_id", "created_at", "updated_at") VALUES (605094243, 304261385, '2020-04-14 12:01:31.919960', '2020-04-14 12:01:31.919960') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Plan Load (0.1ms) SELECT "disco_app_plans".* FROM "disco_app_plans" WHERE "disco_app_plans"."id" = 276395349 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "shopify_id" = 654381179, "confirmation_url" = 'https://apple.myshopify.com/admin/charges/654381179/confirm_recurring_application_charge?signature=BAhpBHsQASc%3D--b2e90c6e4e94fbae15a464c566a31a1c23e6bffa' WHERE "disco_app_recurring_application_charges"."id" = 532970502  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::ChargesServiceTest: test_activating_an_accepted_recurring_charge_is_successful_and_cancels_any_existing_recurring_charges ----------------------------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 532970500 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 472012368 LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 31191756 LIMIT 1 DiscoApp::ApplicationCharge Load (0.2ms) SELECT "disco_app_application_charges".* FROM "disco_app_application_charges" WHERE "disco_app_application_charges"."id" = 550483571 LIMIT 1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."id" = 304261385 LIMIT 1  (0.1ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 1, "updated_at" = '2020-04-14 12:01:31.931555' WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::RecurringApplicationCharge Update All (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 AND "disco_app_recurring_application_charges"."id" != 532970500  (0.2ms) SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Update (0.3ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 3 WHERE "disco_app_recurring_application_charges"."id" = 532970500  (0.1ms) RELEASE SAVEPOINT active_record_1 DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."id" = 332186283 LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN -------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_returns_error_messages_for_webhooks_that_cannot_be_registered -------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [2ee398e6-be6c-4710-8d89-7e345bbe5d62] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 2ee398e6-be6c-4710-8d89-7e345bbe5d62) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [2ee398e6-be6c-4710-8d89-7e345bbe5d62] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 2ee398e6-be6c-4710-8d89-7e345bbe5d62) from Test(default) in 17.46ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 2ee398e6-be6c-4710-8d89-7e345bbe5d62) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------------------------------------------------- DiscoApp::SynchroniseWebhooksJobTest: test_webhook_synchronisation_job_creates_webhooks_for_all_expected_topics --------------------------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [1ea6a111-fc01-4c74-a217-f49be976103a] Performing DiscoApp::SynchroniseWebhooksJob (Job ID: 1ea6a111-fc01-4c74-a217-f49be976103a) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #> [ActiveJob] [DiscoApp::SynchroniseWebhooksJob] [1ea6a111-fc01-4c74-a217-f49be976103a] Performed DiscoApp::SynchroniseWebhooksJob (Job ID: 1ea6a111-fc01-4c74-a217-f49be976103a) from Test(default) in 10.41ms [ActiveJob] Enqueued DiscoApp::SynchroniseWebhooksJob (Job ID: 1ea6a111-fc01-4c74-a217-f49be976103a) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN ----------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_changes_shop_status ----------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.4ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:31.984841' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.4ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] Performing DiscoApp::AppUninstalledJob (Job ID: 85e01ca1-7d20-414f-ae62-739dab9d6ee1) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:01:31.989156' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] DiscoApp::RecurringApplicationCharge Update All (0.2ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] [DiscoApp::SendSubscriptionJob] [2fbb676c-1448-4688-ae3e-b101478acb81] Performing DiscoApp::SendSubscriptionJob (Job ID: 2fbb676c-1448-4688-ae3e-b101478acb81) from Test(default) enqueued at 2020-04-14T12:01:31Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] [DiscoApp::SendSubscriptionJob] [2fbb676c-1448-4688-ae3e-b101478acb81] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] [DiscoApp::SendSubscriptionJob] [2fbb676c-1448-4688-ae3e-b101478acb81] DiscoApp::RecurringApplicationCharge Load (0.3ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] [DiscoApp::SendSubscriptionJob] [2fbb676c-1448-4688-ae3e-b101478acb81] Performed DiscoApp::SendSubscriptionJob (Job ID: 2fbb676c-1448-4688-ae3e-b101478acb81) from Test(default) in 13.41ms [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 2fbb676c-1448-4688-ae3e-b101478acb81) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] DiscoApp::Session Destroy (0.3ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 12:01:32.007058', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:01:32.008677' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [85e01ca1-7d20-414f-ae62-739dab9d6ee1] Performed DiscoApp::AppUninstalledJob (Job ID: 85e01ca1-7d20-414f-ae62-739dab9d6ee1) from Test(default) in 21.58ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 85e01ca1-7d20-414f-ae62-739dab9d6ee1) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN ---------------------------------------------------------------------------------------- DiscoApp::AppUninstalledJobTest: test_app_uninstalled_job_can_be_extended_using_concerns ---------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 4, "updated_at" = '2020-04-14 12:01:32.013377' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] Performing DiscoApp::AppUninstalledJob (Job ID: 8098e179-c126-42af-adb1-dc429b1d5259) from Test(default) enqueued at 2020-04-14T12:01:32Z with arguments: #>, {} [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] DiscoApp::Shop Exists? (0.2ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "status" = 5, "updated_at" = '2020-04-14 12:01:32.016426' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] DiscoApp::RecurringApplicationCharge Update All (0.4ms) UPDATE "disco_app_recurring_application_charges" SET "status" = 4 WHERE "disco_app_recurring_application_charges"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] [DiscoApp::SendSubscriptionJob] [08dffb62-f55a-4bbe-be3e-d66000ff97db] Performing DiscoApp::SendSubscriptionJob (Job ID: 08dffb62-f55a-4bbe-be3e-d66000ff97db) from Test(default) enqueued at 2020-04-14T12:01:32Z with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] [DiscoApp::SendSubscriptionJob] [08dffb62-f55a-4bbe-be3e-d66000ff97db] DiscoApp::Subscription Load (0.4ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] [DiscoApp::SendSubscriptionJob] [08dffb62-f55a-4bbe-be3e-d66000ff97db] DiscoApp::RecurringApplicationCharge Load (0.4ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] [DiscoApp::SendSubscriptionJob] [08dffb62-f55a-4bbe-be3e-d66000ff97db] Performed DiscoApp::SendSubscriptionJob (Job ID: 08dffb62-f55a-4bbe-be3e-d66000ff97db) from Test(default) in 13.07ms [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 08dffb62-f55a-4bbe-be3e-d66000ff97db) to Test(default) with arguments: #> [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] DiscoApp::Session Destroy (0.2ms) DELETE FROM "disco_app_sessions" WHERE "disco_app_sessions"."shop_id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259]  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] DiscoApp::Shop Exists? (0.3ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] DiscoApp::Shop Update (0.3ms) UPDATE "disco_app_shops" SET "updated_at" = '2020-04-14 12:01:32.034997', "data" = '{"timezone":"(GMT+10:00) Melbourne","country_name":"Nowhere"}' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259]  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259]  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] DiscoApp::Shop Exists? (0.4ms) SELECT 1 AS one FROM "disco_app_shops" WHERE LOWER("disco_app_shops"."shopify_domain") = LOWER('widgets.myshopify.com') AND "disco_app_shops"."id" != 605094243 LIMIT 1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] DiscoApp::Shop Update (0.2ms) UPDATE "disco_app_shops" SET "status" = 6, "updated_at" = '2020-04-14 12:01:32.037785' WHERE "disco_app_shops"."id" = 605094243 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [DiscoApp::AppUninstalledJob] [8098e179-c126-42af-adb1-dc429b1d5259] Performed DiscoApp::AppUninstalledJob (Job ID: 8098e179-c126-42af-adb1-dc429b1d5259) from Test(default) in 23.44ms [ActiveJob] Enqueued DiscoApp::AppUninstalledJob (Job ID: 8098e179-c126-42af-adb1-dc429b1d5259) to Test(default) with arguments: #>, {} DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------------- DiscoApp::SendSubscriptionJobTest: test_subscription_job_correctly_sends_request_to_API --------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [38bcee23-dc58-4ece-a2fa-24ac57a7421e] Performing DiscoApp::SendSubscriptionJob (Job ID: 38bcee23-dc58-4ece-a2fa-24ac57a7421e) from Test(default) enqueued at 2020-04-14T12:01:32Z with arguments: #> [ActiveJob] [DiscoApp::SendSubscriptionJob] [38bcee23-dc58-4ece-a2fa-24ac57a7421e] DiscoApp::Subscription Load (0.2ms) SELECT "disco_app_subscriptions".* FROM "disco_app_subscriptions" WHERE "disco_app_subscriptions"."shop_id" = 605094243 AND "disco_app_subscriptions"."status" IN (0, 1) ORDER BY "disco_app_subscriptions"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [38bcee23-dc58-4ece-a2fa-24ac57a7421e] DiscoApp::RecurringApplicationCharge Load (0.2ms) SELECT "disco_app_recurring_application_charges".* FROM "disco_app_recurring_application_charges" WHERE "disco_app_recurring_application_charges"."subscription_id" = 304261385 AND "disco_app_recurring_application_charges"."status" = 3 ORDER BY "disco_app_recurring_application_charges"."id" ASC LIMIT 1 [ActiveJob] [DiscoApp::SendSubscriptionJob] [38bcee23-dc58-4ece-a2fa-24ac57a7421e] Performed DiscoApp::SendSubscriptionJob (Job ID: 38bcee23-dc58-4ece-a2fa-24ac57a7421e) from Test(default) in 12.99ms [ActiveJob] Enqueued DiscoApp::SendSubscriptionJob (Job ID: 38bcee23-dc58-4ece-a2fa-24ac57a7421e) to Test(default) with arguments: #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN --------------------------------------------------------------------- DiscoApp::CanBeLiquifiedTest: test_correct_liquid_is_output_for_model ---------------------------------------------------------------------  (0.1ms) ROLLBACK  (0.1ms) BEGIN --------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_creates_model --------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.2ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.2ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:32.061357', '2020-04-14 12:01:32.061357') RETURNING "id"  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: d0997b9f-b369-46a6-b8ac-3334d56c05b4) to Test(default) with arguments: #>, #>  (0.2ms) ROLLBACK  (0.2ms) BEGIN ------------------------------------------------------------------------------------------- DiscoApp::Flow::CreateTriggerTest: test_call_to_create_flow_trigger_enqueues_processing_job ------------------------------------------------------------------------------------------- DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1  (0.3ms) SAVEPOINT active_record_1 DiscoApp::Flow::Trigger Create (0.4ms) INSERT INTO "disco_app_flow_triggers" ("shop_id", "title", "resource_name", "resource_url", "properties", "created_at", "updated_at") VALUES (605094243, 'Test trigger', 'test_resource_name', 'https://example.com/test-resource-url', '{"Customer email":"name@example.com"}', '2020-04-14 12:01:32.066604', '2020-04-14 12:01:32.066604') RETURNING "id"  (0.2ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] Enqueued DiscoApp::Flow::ProcessTriggerJob (Job ID: 7f2d4dfa-8b14-4229-9d95-96949c33c70e) to Test(default) with arguments: #>, #> DiscoApp::Shop Load (0.3ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 48 LIMIT 1 DiscoApp::Shop Load (0.2ms) SELECT "disco_app_shops".* FROM "disco_app_shops" WHERE "disco_app_shops"."id" = 605094243 LIMIT 1 DiscoApp::Flow::Trigger Load (0.2ms) SELECT "disco_app_flow_triggers".* FROM "disco_app_flow_triggers" WHERE "disco_app_flow_triggers"."id" = 48 LIMIT 1  (0.1ms) ROLLBACK